1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

- Back out 1.155. I mismerged my ancient local patch. Luckily it was

completely noop.
- Geometry sanitization for non-interactive mode is moved to correct place.

Reported by:	Anton Yuzhaninov <citrin at citrin dot ru>
Pointyhat:	me
This commit is contained in:
Jung-uk Kim 2006-02-23 23:41:42 +00:00
parent adcddbf0b1
commit 6637b6368e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155965
2 changed files with 46 additions and 36 deletions

View File

@ -124,25 +124,18 @@ print_chunks(Disk *d, int u)
#else
if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) {
#endif
if (!variable_get(VAR_NONINTERACTIVE)) {
dialog_clear_norefresh();
msgConfirm("WARNING: A geometry of %lu/%lu/%lu for %s is incorrect. Using\n"
"a more likely geometry. If this geometry is incorrect or you\n"
"are unsure as to whether or not it's correct, please consult\n"
"the Hardware Guide in the Documentation submenu or use the\n"
"(G)eometry command to change it now.\n\n"
"Remember: you need to enter whatever your BIOS thinks the\n"
"geometry is! For IDE, it's what you were told in the BIOS\n"
"setup. For SCSI, it's the translation mode your controller is\n"
"using. Do NOT use a ``physical geometry''.",
d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
}
else
msgDebug("A geometry of %lu/%lu/%lu for %s is incorrect.\n",
d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
dialog_clear_norefresh();
msgConfirm("WARNING: A geometry of %lu/%lu/%lu for %s is incorrect. Using\n"
"a more likely geometry. If this geometry is incorrect or you\n"
"are unsure as to whether or not it's correct, please consult\n"
"the Hardware Guide in the Documentation submenu or use the\n"
"(G)eometry command to change it now.\n\n"
"Remember: you need to enter whatever your BIOS thinks the\n"
"geometry is! For IDE, it's what you were told in the BIOS\n"
"setup. For SCSI, it's the translation mode your controller is\n"
"using. Do NOT use a ``physical geometry''.",
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);
}
attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t");
@ -923,6 +916,18 @@ diskPartitionNonInteractive(Device *dev)
d->bios_sect = strtol(cp + 1, 0, 0);
}
#ifdef PC98
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) {
#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",
d->name, d->bios_cyl, d->bios_hd, d->bios_sect);
}
cp = variable_get(VAR_PARTITION);
if (cp) {
if (!strcmp(cp, "free")) {

View File

@ -124,25 +124,18 @@ print_chunks(Disk *d, int u)
#else
if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) {
#endif
if (!variable_get(VAR_NONINTERACTIVE)) {
dialog_clear_norefresh();
msgConfirm("WARNING: A geometry of %lu/%lu/%lu for %s is incorrect. Using\n"
"a more likely geometry. If this geometry is incorrect or you\n"
"are unsure as to whether or not it's correct, please consult\n"
"the Hardware Guide in the Documentation submenu or use the\n"
"(G)eometry command to change it now.\n\n"
"Remember: you need to enter whatever your BIOS thinks the\n"
"geometry is! For IDE, it's what you were told in the BIOS\n"
"setup. For SCSI, it's the translation mode your controller is\n"
"using. Do NOT use a ``physical geometry''.",
d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
}
else
msgDebug("A geometry of %lu/%lu/%lu for %s is incorrect.\n",
d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
dialog_clear_norefresh();
msgConfirm("WARNING: A geometry of %lu/%lu/%lu for %s is incorrect. Using\n"
"a more likely geometry. If this geometry is incorrect or you\n"
"are unsure as to whether or not it's correct, please consult\n"
"the Hardware Guide in the Documentation submenu or use the\n"
"(G)eometry command to change it now.\n\n"
"Remember: you need to enter whatever your BIOS thinks the\n"
"geometry is! For IDE, it's what you were told in the BIOS\n"
"setup. For SCSI, it's the translation mode your controller is\n"
"using. Do NOT use a ``physical geometry''.",
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);
}
attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t");
@ -923,6 +916,18 @@ diskPartitionNonInteractive(Device *dev)
d->bios_sect = strtol(cp + 1, 0, 0);
}
#ifdef PC98
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) {
#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",
d->name, d->bios_cyl, d->bios_hd, d->bios_sect);
}
cp = variable_get(VAR_PARTITION);
if (cp) {
if (!strcmp(cp, "free")) {