]> wimlib.net Git - wimlib/commitdiff
execute_fusermount(): Check status of 'umount' properly
authorEric Biggers <ebiggers3@gmail.com>
Sun, 12 Jan 2014 05:38:37 +0000 (23:38 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 12 Jan 2014 05:38:55 +0000 (23:38 -0600)
Code is only reached if fusermount command does not work.

src/mount_image.c

index 5829e6aaba05b2a7cb6e26f85ec2543a5e1bb907..d8a94296ee915779e4e0c608613d9e1ecda479dc 100644 (file)
@@ -1526,10 +1526,12 @@ execute_fusermount(const char *dir, bool lazy)
                                 "terminate");
                return WIMLIB_ERR_FUSERMOUNT;
        }
-       if (status != 0) {
+
+       if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
                ERROR("`umount' did not successfully complete");
                return WIMLIB_ERR_FUSERMOUNT;
        }
+
        return 0;
 }