Do not sanitize disk geometry if it is set by scripts in non-interactive mode.

MFC after:	3 days
This commit is contained in:
Jung-uk Kim 2008-01-31 16:54:02 +00:00
parent 7157eae462
commit 4a994e8a93
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175860

View File

@ -920,18 +920,18 @@ diskPartitionNonInteractive(Device *dev)
d->bios_cyl = strtol(cp, &cp, 0);
d->bios_hd = strtol(cp + 1, &cp, 0);
d->bios_sect = strtol(cp + 1, 0, 0);
}
} else {
#ifdef PC98
if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) {
if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) {
#else
if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) {
if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) {
#endif
msgDebug("Warning: A geometry of %lu/%lu/%lu for %s is incorrect.\n",
d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
Sanitize_Bios_Geom(d);
msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n",
msgDebug("Warning: A geometry of %lu/%lu/%lu for %s is incorrect.\n",
d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
Sanitize_Bios_Geom(d);
msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n",
d->name, d->bios_cyl, d->bios_hd, d->bios_sect);
}
}
cp = variable_get(VAR_PARTITION);