summaryrefslogtreecommitdiffstats
path: root/partx/partx.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-04 19:53:13 +0200
committerSami Kerola2012-04-04 19:53:13 +0200
commit757bbfad4f78112a8bb537dff51790eb9b5b9e57 (patch)
tree18f3c935c2d198dee410ded36aad5f14acfa31c7 /partx/partx.c
parentschedutils: verify writing to streams was successful (diff)
downloadkernel-qcow2-util-linux-757bbfad4f78112a8bb537dff51790eb9b5b9e57.tar.gz
kernel-qcow2-util-linux-757bbfad4f78112a8bb537dff51790eb9b5b9e57.tar.xz
kernel-qcow2-util-linux-757bbfad4f78112a8bb537dff51790eb9b5b9e57.zip
partx: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'partx/partx.c')
-rw-r--r--partx/partx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/partx/partx.c b/partx/partx.c
index 0c46af6eb..f19b91928 100644
--- a/partx/partx.c
+++ b/partx/partx.c
@@ -33,6 +33,7 @@
#include "sysfs.h"
#include "loopdev.h"
#include "at.h"
+#include "closestream.h"
/* this is the default upper limit, could be modified by --nr */
#define SLICES_MAX 256
@@ -667,6 +668,7 @@ int main(int argc, char **argv)
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
while ((c = getopt_long(argc, argv,
"abdglrsvn:t:o:PhV", long_opts, NULL)) != -1) {