193 files changed, 80411 insertions, 44563 deletions
diff --git a/src/ntfs-3g.probe.c b/src/ntfs-3g.probe.c index 592abd7..cb73aee 100755 --- a/src/ntfs-3g.probe.c +++ b/src/ntfs-3g.probe.c @@ -68,13 +68,14 @@ static int ntfs_open(const char *device) int ret = NTFS_VOLUME_OK; if (opts.probetype == PROBE_READONLY) - flags |= MS_RDONLY; + flags |= NTFS_MNT_RDONLY; vol = ntfs_mount(device, flags); 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; } @@ -158,6 +159,8 @@ int main(int argc, char *argv[]) err = ntfs_open(opts.device); free(opts.device); - exit(err); + if (err) + exit(err); + return (0); } |