summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdformat.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-04 20:04:39 +0200
committerSami Kerola2012-04-04 20:04:39 +0200
commit45ca68ece78dd5d0f83863e33bfad2cc88fc2d1e (patch)
tree2da8b40a1f32f0779770f38c1ac1119e61b62713 /disk-utils/fdformat.c
parentfdisk: verify writing to streams was successful (diff)
downloadkernel-qcow2-util-linux-45ca68ece78dd5d0f83863e33bfad2cc88fc2d1e.tar.gz
kernel-qcow2-util-linux-45ca68ece78dd5d0f83863e33bfad2cc88fc2d1e.tar.xz
kernel-qcow2-util-linux-45ca68ece78dd5d0f83863e33bfad2cc88fc2d1e.zip
disk-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/fdformat.c')
-rw-r--r--disk-utils/fdformat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c
index 29782ec9a..ec2f6170e 100644
--- a/disk-utils/fdformat.c
+++ b/disk-utils/fdformat.c
@@ -12,6 +12,7 @@
#include <unistd.h>
#include "c.h"
+#include "closestream.h"
#include "nls.h"
#include "xalloc.h"
@@ -119,6 +120,7 @@ int main(int argc, char **argv)
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
while ((ch = getopt_long(argc, argv, "nVh", longopts, NULL)) != -1)
switch (ch) {