diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-29 13:02:32 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-29 13:02:32 +0000 |
commit | 8a9ab5d2b77b4dee07dc897da5cce4803629b642 (patch) | |
tree | a454279f71ffbcd4f4af43078a6d67f999437b6b /sbin/newfs | |
parent | 94df645ebfff43be5a8699deed4a7e92af072efb (diff) |
More read/write result checking fixes to avoid unsigned comparisons vs
-1.
ok henning@ beck@ ray@
Diffstat (limited to 'sbin/newfs')
-rw-r--r-- | sbin/newfs/newfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 5bc1da4c873..08781c4009f 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.74 2008/01/15 14:23:25 sthen Exp $ */ +/* $OpenBSD: newfs.c,v 1.75 2008/01/29 13:02:31 krw Exp $ */ /* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* @@ -630,7 +630,7 @@ rewritelabel(char *s, int fd, struct disklabel *lp) if (lseek(cfd, offset, SEEK_SET) == -1) fatal("lseek to badsector area: %s", strerror(errno)); - if (write(cfd, blk, lp->d_secsize) < lp->d_secsize) + if (write(cfd, blk, lp->d_secsize) != lp->d_secsize) warn("alternate label %d write", i/2); } close(cfd); |