Warn about partitions that would overlap with the master boot record, and
if the user agrees, move them out one track. MFC after: 7 days
This commit is contained in:
parent
9f067574ba
commit
7fb7df3159
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122627
@ -1300,6 +1300,11 @@ sanitize_partition(struct dos_partition *partp)
|
|||||||
if (start % dos_sectors == 0 && (start + size) % dos_sectors == 0)
|
if (start % dos_sectors == 0 && (start + size) % dos_sectors == 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
|
if (start == 0) {
|
||||||
|
warnx("WARNING: partition overlaps with partition table");
|
||||||
|
if (ok("Correct this automatically?"))
|
||||||
|
start = dos_sectors;
|
||||||
|
}
|
||||||
if (start % dos_sectors != 0)
|
if (start % dos_sectors != 0)
|
||||||
warnx("WARNING: partition does not start on a head boundary");
|
warnx("WARNING: partition does not start on a head boundary");
|
||||||
if ((start +size) % dos_sectors != 0)
|
if ((start +size) % dos_sectors != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user