diff options
author | Sami Kerola | 2013-04-13 21:54:58 +0200 |
---|---|---|
committer | Karel Zak | 2013-04-26 13:26:07 +0200 |
commit | 5f52af507b9ab1799f39b80d5561266ad02216b9 (patch) | |
tree | d3c265f0aa28a151238ef736e72637fd3f5d05d2 /sys-utils | |
parent | swaplabel: check writing to a file descriptor was successful (diff) | |
download | kernel-qcow2-util-linux-5f52af507b9ab1799f39b80d5561266ad02216b9.tar.gz kernel-qcow2-util-linux-5f52af507b9ab1799f39b80d5561266ad02216b9.tar.xz kernel-qcow2-util-linux-5f52af507b9ab1799f39b80d5561266ad02216b9.zip |
fallocate: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/fallocate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c index ff0f9e6e1..6a876736a 100644 --- a/sys-utils/fallocate.c +++ b/sys-utils/fallocate.c @@ -168,6 +168,7 @@ int main(int argc, char **argv) err(EXIT_FAILURE, _("%s: fallocate failed"), fname); } - close(fd); + if (close_fd(fd) != 0) + err(EXIT_FAILURE, _("write failed: %s"), fname); return EXIT_SUCCESS; } |