diff options
author | Karel Zak <kzak@redhat.com> | 2008-04-16 14:13:42 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2008-04-16 21:58:26 +0200 |
commit | 89fb9aeb55813dfecf385ede04c5b371bbd5e11e (patch) | |
tree | aa108607082974827034ca550cd9d433452c6666 /disk-utils | |
parent | 3c52010c68c3d554979cca22a529aed15794eb80 (diff) | |
download | util-linux-old-89fb9aeb55813dfecf385ede04c5b371bbd5e11e.tar.gz |
mkswap: set errno=0 in write_all()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r-- | disk-utils/mkswap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index dc3a3d30..10068b71 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -469,8 +469,10 @@ check_mount(void) { static int write_all(int fd, const void *buf, size_t count) { while(count) { - ssize_t tmp = write(fd, buf, count); + ssize_t tmp; + errno = 0; + tmp = write(fd, buf, count); if (tmp > 0) { count -= tmp; if (count) |