X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fmount_image.c;h=1a8443e3f6d6c36533af7c0b91f23afa49ca16b4;hb=bbce7c1d2333071b7056b65ba75074c639a027eb;hp=5829e6aaba05b2a7cb6e26f85ec2543a5e1bb907;hpb=439beeac4b861e7a95169d7d4397acddb440e73a;p=wimlib diff --git a/src/mount_image.c b/src/mount_image.c index 5829e6aa..1a8443e3 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; } @@ -2029,7 +2031,7 @@ wimfs_readlink(const char *path, char *buf, size_t buf_len) if (!inode_is_symlink(inode)) return -EINVAL; if (buf_len == 0) - return -ENAMETOOLONG; + return -EINVAL; ret = wim_inode_readlink(inode, buf, buf_len - 1, NULL); if (ret >= 0) { wimlib_assert(ret <= buf_len - 1);