Szaka prefers to have the lofgile reset and dirty bit setting done even if they
are already done so remove the conditionals I added.edge.strict_endians
parent
2b611a1461
commit
a38ead2f20
|
@ -14,14 +14,14 @@ is a utility that fixes some common NTFS problems.
|
|||
.B ntfsfix
|
||||
is
|
||||
.B NOT
|
||||
a Linux version of chkdsk. It only repairs some fundamental NTFS
|
||||
a Linux version of chkdsk. It only repairs some fundamental NTFS
|
||||
inconsistencies, resets the NTFS journal file and schedules an NTFS consistency
|
||||
check for the first boot into Windows.
|
||||
.sp
|
||||
You may run
|
||||
.B ntfsfix
|
||||
on an NTFS volume if you think it was damaged by Windows or some other way
|
||||
and it can't be mounted.
|
||||
and it cannot be mounted.
|
||||
.SH OPTIONS
|
||||
Below is a summary of all the options that
|
||||
.B ntfsfix
|
||||
|
|
|
@ -259,8 +259,8 @@ static int set_dirty_flag(ntfs_volume *vol)
|
|||
return -1;
|
||||
}
|
||||
vol->flags = flags;
|
||||
ntfs_log_info(OK);
|
||||
NVolSetWasDirty(vol);
|
||||
ntfs_log_info(OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2289,25 +2289,19 @@ static ntfs_volume *mount_volume(void)
|
|||
*/
|
||||
static void prepare_volume_fixup(ntfs_volume *vol)
|
||||
{
|
||||
/* No need to schedule chkdsk if it is already scheduled. */
|
||||
if (!NVolWasDirty(vol)) {
|
||||
printf("Schedule chkdsk for NTFS consistency check at Windows "
|
||||
"boot time ...\n");
|
||||
vol->flags |= VOLUME_IS_DIRTY;
|
||||
if (ntfs_volume_write_flags(vol, vol->flags))
|
||||
perr_exit("Failed to set the volume dirty");
|
||||
NVolSetWasDirty(vol);
|
||||
if (vol->dev->d_ops->sync(vol->dev) == -1)
|
||||
perr_exit("Failed to sync device");
|
||||
}
|
||||
/* No need to empty the journal if it is already empty. */
|
||||
if (!NVolLogFileEmpty(vol)) {
|
||||
printf("Resetting $LogFile ... (this might take a while)\n");
|
||||
if (ntfs_logfile_reset(vol))
|
||||
perr_exit("Failed to reset $LogFile");
|
||||
if (vol->dev->d_ops->sync(vol->dev) == -1)
|
||||
perr_exit("Failed to sync device");
|
||||
}
|
||||
printf("Schedule chkdsk for NTFS consistency check at Windows boot "
|
||||
"time ...\n");
|
||||
vol->flags |= VOLUME_IS_DIRTY;
|
||||
if (ntfs_volume_write_flags(vol, vol->flags))
|
||||
perr_exit("Failed to set the volume dirty");
|
||||
NVolSetWasDirty(vol);
|
||||
if (vol->dev->d_ops->sync(vol->dev) == -1)
|
||||
perr_exit("Failed to sync device");
|
||||
printf("Resetting $LogFile ... (this might take a while)\n");
|
||||
if (ntfs_logfile_reset(vol))
|
||||
perr_exit("Failed to reset $LogFile");
|
||||
if (vol->dev->d_ops->sync(vol->dev) == -1)
|
||||
perr_exit("Failed to sync device");
|
||||
}
|
||||
|
||||
static void set_disk_usage_constraint(ntfs_resize_t *resize)
|
||||
|
|
Loading…
Reference in New Issue