char *from
= "/dev/rhp0c";
int count
= 814; /*480 for h file system on ampex*/
start
= atoi(*argv
++), argc
--;
bsize
= atoi(*argv
++), argc
--;
count
= atoi(*argv
++), argc
--;
printf("from %s to %s, %d groups of %d blocks offset %d\n",
from
, to
, count
, bsize
, start
);
buf
= (char *)sbrk(bsize
);
if (lseek(0, start
, 0) < 0)
perror("seek 0"), exit(1);
if (lseek(1, start
+(200000*512), 0) < 0)
perror("seek 1"), exit(1);
if (read(0, buf
, bsize
) != bsize
) {
printf("read block %d: ", start
/ 512);
} else if (write(1, buf
, bsize
) != bsize
) {
printf("write block %d: ", start
/ 512);