cut 0.5k off mkfs.minix

assorted strtoul fixes (that's what brought me into minix)...
This commit is contained in:
Denis Vlasenko
2006-11-29 18:15:52 +00:00
parent a35c9e91ba
commit c6ce8733dd
5 changed files with 131 additions and 207 deletions

View File

@@ -147,8 +147,11 @@ void xwrite(int fd, const void *buf, size_t count)
off_t xlseek(int fd, off_t offset, int whence)
{
off_t off = lseek(fd, offset, whence);
if (off == (off_t)-1)
if (off == (off_t)-1) {
if (whence == SEEK_SET)
bb_perror_msg_and_die("lseek(%"OFF_FMT"u)", offset);
bb_perror_msg_and_die("lseek");
}
return off;
}