Mentioned the starting sector when it overflows in mkntfs

In an NTFS boot sector, the first sector of the partition is limited to
32 bits and it may overflow on large disks. This field is only used for
booting on the partition and it is ignored by ntfs-3g, but the warning
in mkntfs mislead users, so improve it.
This commit is contained in:
Jean-Pierre André 2015-09-30 08:25:25 +02:00
parent 8a3c3c477c
commit 5ebe36f10a
2 changed files with 9 additions and 5 deletions

View File

@ -156,7 +156,9 @@ omitted,
.B mkntfs
attempts to determine
.I part\-start\-sect
automatically and if that fails a default of 0 is used. Note that
automatically and if that fails or the value is oversized, a
default of 0 is used. The partition is usable despite a wrong value,
however note that a correct
.I part\-start\-sect
is required for Windows to be able to boot from the created volume.
.TP

View File

@ -3635,10 +3635,12 @@ static BOOL mkntfs_override_vol_params(ntfs_volume *vol)
opts.part_start_sect = 0;
winboot = FALSE;
} else if (opts.part_start_sect >> 32) {
ntfs_log_warning("The partition start sector specified "
"for %s and the automatically determined value "
"is too large. It has been set to 0.\n",
vol->dev->d_name);
ntfs_log_warning("The partition start sector was not "
"specified for %s and the automatically "
"determined value is too large (%lld). "
"It has been set to 0.\n",
vol->dev->d_name,
(long long)opts.part_start_sect);
opts.part_start_sect = 0;
winboot = FALSE;
}