diff options
author | jkim <jkim@FreeBSD.org> | 2006-01-27 21:41:49 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2006-01-27 21:41:49 +0000 |
commit | 52d005c3fb8c314a84022831b26351c8ecb3c24a (patch) | |
tree | 2af5fc0500fa0d9d782856ba485d8b02dd94d60e /usr.sbin | |
parent | c2e2425399f48a6a8dfb780503a336df90250acd (diff) | |
download | FreeBSD-src-52d005c3fb8c314a84022831b26351c8ecb3c24a.zip FreeBSD-src-52d005c3fb8c314a84022831b26351c8ecb3c24a.tar.gz |
- Hide 'incorrect geometry warning' in non-interactive mode. A user should
know what they are doing in non-interactive mode. Less scarier warning
goes to debugging info instead.
- Print sanitized geometry to debugging info.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/disks.c | 29 | ||||
-rw-r--r-- | usr.sbin/sysinstall/disks.c | 29 |
2 files changed, 36 insertions, 22 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index a60ced5..4b3dac9 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -124,18 +124,25 @@ print_chunks(Disk *d, int u) #else if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { #endif - 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); + 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); 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"); diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index a60ced5..4b3dac9 100644 --- a/usr.sbin/sysinstall/disks.c +++ b/usr.sbin/sysinstall/disks.c @@ -124,18 +124,25 @@ print_chunks(Disk *d, int u) #else if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { #endif - 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); + 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); 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"); |