/* devcopy.c 1.1 86/01/12 */
printf("Source device : ");
printf("Copy to device : ");
printf("Number of blocks : ");
if (input
<= 0) printf("Cannot open %s\n", dev
);
if (output
<= 0) printf("Cannot open output\n", disk
);
} while (input
<= 0 || output
<= 0);
i
= 0; /* Block number */
while (n
== BSIZE
&& i
< j
) {
if (i
> 0 && (i
%500 == 0) ) printf("%d blocks\n", i
);
lseek (input
, i
*BSIZE
, 0);
n
= read (input
, buffer
, BSIZE
);
lseek (output
, i
*BSIZE
, 0);
n
= write(output
, buffer
, BSIZE
);
if (n
!= BSIZE
) printf("Short write, block %d, %d bytes only\n",i
,n
);
else printf("Short read, block %d, %d bytes only\n",i
,n
);
printf ("Total of %d blocks copied\n",i
);
while (*response
== ' ' || *response
== '\t') response
++;
while (*response
>= '0' && *response
<= '9') {
j
= j
*10 + *response
- '0';