From cb3aad8a63f01e8c7b8d5427798695f10020490b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Fri, 4 Nov 2011 11:11:40 +0100 Subject: [PATCH] Minor : fixed a test of volume dirty flag in ntfsfix --- ntfsprogs/ntfsfix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsfix.c b/ntfsprogs/ntfsfix.c index 3d977e24..828ee05b 100644 --- a/ntfsprogs/ntfsfix.c +++ b/ntfsprogs/ntfsfix.c @@ -291,7 +291,7 @@ static int set_dirty_flag(ntfs_volume *vol) /* Porting note: We test for the current state of VOLUME_IS_DIRTY. This * should actually be more appropriate than testing for NVolWasDirty. */ - if (vol->flags | VOLUME_IS_DIRTY) + if (vol->flags & VOLUME_IS_DIRTY) return 0; ntfs_log_info("Setting required flags on partition... "); /* @@ -299,7 +299,7 @@ static int set_dirty_flag(ntfs_volume *vol) * and fix it for us. */ flags = vol->flags | VOLUME_IS_DIRTY; - if (OLD_ntfs_volume_set_flags(vol, flags)) { + if (!opt.no_action && OLD_ntfs_volume_set_flags(vol, flags)) { ntfs_log_info(FAILED); ntfs_log_error("Error setting volume flags.\n"); return -1;