* clri filsys inumber ...
#define ISIZE (sizeof(struct dinode))
printf("usage: clri filsys inumber ...\n");
printf("cannot open %s\n", argv
[1]);
printf("%s: is not a number\n", argv
[i
]);
printf("%s: is zero\n", argv
[i
]);
off
= ((n
-1)/NI
+ 2) * (long)512;
if(read(f
, (char *)buf
, BSIZE
) != BSIZE
) {
printf("%s: read error\n", argv
[i
]);
printf("clearing %u\n", n
);
off
= ((n
-1)/NI
+ 2) * (long)512;
read(f
, (char *)buf
, BSIZE
);
write(f
, (char *)buf
, BSIZE
);