SCCS-vsn: sbin/newfs/mkfs.c 6.29
-static char sccsid[] = "@(#)mkfs.c 6.28 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkfs.c 6.29 (Berkeley) %G%";
#endif /* not lint */
#include <unistd.h>
#endif /* not lint */
#include <unistd.h>
exit(33);
}
n = read(fsi, bf, size);
exit(33);
}
n = read(fsi, bf, size);
printf("read error: %ld\n", bno);
perror("rdfs");
exit(34);
printf("read error: %ld\n", bno);
perror("rdfs");
exit(34);
- if (lseek(fso, (off_t)bno * sectorsize, 0) < 0) {
+ if (lseek(fso, (off_t)bno * sectorsize, SEEK_SET) < 0) {
printf("seek error: %ld\n", bno);
perror("wtfs");
exit(35);
}
n = write(fso, bf, size);
printf("seek error: %ld\n", bno);
perror("wtfs");
exit(35);
}
n = write(fso, bf, size);
printf("write error: %ld\n", bno);
perror("wtfs");
exit(36);
printf("write error: %ld\n", bno);
perror("wtfs");
exit(36);