summaryrefslogtreecommitdiffstats
path: root/fdisk/cfdisk.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/cfdisk.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/cfdisk.c')
-rw-r--r--fdisk/cfdisk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c
index a128ed757..a6cf01e5c 100644
--- a/fdisk/cfdisk.c
+++ b/fdisk/cfdisk.c
@@ -97,6 +97,7 @@
#include <wctype.h>
#endif
+#include "closestream.h"
#include "nls.h"
#include "rpmatch.h"
#include "blkdev.h"
@@ -2767,6 +2768,7 @@ main(int argc, char **argv)
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
while ((c = getopt(argc, argv, "ac:gh:s:vzP:")) != -1)
switch (c) {