summaryrefslogtreecommitdiffstats
path: root/fdisk/sfdisk.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-04 20:02:04 +0200
committerSami Kerola2012-04-04 20:02:04 +0200
commitb2d28533ddd536f32dc18097524af3498cc0ebf0 (patch)
treef7182b5efc7ce9a49c4fab84dad2d27aa5a42dd9 /fdisk/sfdisk.c
parentgetopt: verify writing to streams was successful (diff)
downloadkernel-qcow2-util-linux-b2d28533ddd536f32dc18097524af3498cc0ebf0.tar.gz
kernel-qcow2-util-linux-b2d28533ddd536f32dc18097524af3498cc0ebf0.tar.xz
kernel-qcow2-util-linux-b2d28533ddd536f32dc18097524af3498cc0ebf0.zip
fdisk: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'fdisk/sfdisk.c')
-rw-r--r--fdisk/sfdisk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index a090772a8..f0ce08bcb 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -54,6 +54,7 @@
#include "pathnames.h"
#include "canonicalize.h"
#include "rpmatch.h"
+#include "closestream.h"
/*
* Table of contents:
@@ -2572,6 +2573,7 @@ main(int argc, char **argv) {
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
if (argc < 1)
errx(EXIT_FAILURE, _("no command?"));