From d85675bf6d9c02f87db80324f4aa2e478b580e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 23 Jan 2012 17:34:19 +0100 Subject: [PATCH] Returned unmount errors in ntfs-3g.probe (Diego Elio Petteno) ntfs-3g.probe is used to get information about mounting errors, this extends the use for unmounting errors. --- src/ntfs-3g.probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ntfs-3g.probe.c b/src/ntfs-3g.probe.c index 592abd76..238210f2 100644 --- a/src/ntfs-3g.probe.c +++ b/src/ntfs-3g.probe.c @@ -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; }