Minor : fixed a test of volume dirty flag in ntfsfix

edge.strict_endians
Jean-Pierre André 2011-11-04 11:11:40 +01:00
parent b76883dc84
commit cb3aad8a63
1 changed files with 2 additions and 2 deletions

View File

@ -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;