]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - disk-utils/mkfs.cramfs.c
disk-utils: verify writing to streams was successful
[thirdparty/util-linux.git] / disk-utils / mkfs.cramfs.c
index 9777eaf976b6472c1128f5098d19635079251f01..8e38a8c89ac24abcea858052fc271f80d95f2733 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "c.h"
 #include "cramfs.h"
+#include "closestream.h"
 #include "md5.h"
 #include "nls.h"
 #include "exitcodes.h"
@@ -718,6 +719,7 @@ int main(int argc, char **argv)
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
+       atexit(close_stdout);
 
        /* command line options */
        while ((c = getopt(argc, argv, "hb:Ee:i:n:N:psVvz")) != EOF) {