From: Eric Biggers Date: Sun, 12 Jan 2014 05:38:37 +0000 (-0600) Subject: execute_fusermount(): Check status of 'umount' properly X-Git-Tag: v1.6.1~71 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=603bfc3c873dfb6517e6819ca79275787046fcba execute_fusermount(): Check status of 'umount' properly Code is only reached if fusermount command does not work. --- diff --git a/src/mount_image.c b/src/mount_image.c index 5829e6aa..d8a94296 100644 --- a/src/mount_image.c +++ b/src/mount_image.c @@ -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; }