OSDN Git Service

Returned unmount errors in ntfs-3g.probe (Diego Elio Petteno)
authorJean-Pierre André <jpandre@users.sourceforge.net>
Mon, 23 Jan 2012 16:34:19 +0000 (17:34 +0100)
committerJean-Pierre André <jpandre@users.sourceforge.net>
Mon, 23 Jan 2012 16:34:19 +0000 (17:34 +0100)
ntfs-3g.probe is used to get information about mounting errors, this
extends the use for unmounting errors.

src/ntfs-3g.probe.c

index 592abd7..238210f 100644 (file)
@@ -74,7 +74,8 @@ static int ntfs_open(const char *device)
        if (!vol)
                ret = ntfs_volume_error(errno);
 
-       ntfs_umount(vol, FALSE);
+       if (ret == 0 && ntfs_umount(vol, FALSE) == -1)
+               ret = ntfs_volume_error(errno);
 
        return ret;
 }