diff options
author | nyan <nyan@FreeBSD.org> | 2002-10-14 13:15:14 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-10-14 13:15:14 +0000 |
commit | 879ba46c821eedc1cfe8c27f035e715da0f3fad1 (patch) | |
tree | 73f7c02c8ce25f3eda5665080ad971f277b19f1e /usr.sbin | |
parent | 92b6682eed09c447913d957533c0e302d822e235 (diff) | |
download | FreeBSD-src-879ba46c821eedc1cfe8c27f035e715da0f3fad1.zip FreeBSD-src-879ba46c821eedc1cfe8c27f035e715da0f3fad1.tar.gz |
Fix to check disk geometry.
Submitted by: kawanobe@st.rim.or.jp (Kawanobe Koh)
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/disks.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/disks.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index 992512b..78e700f 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -96,8 +96,11 @@ print_chunks(Disk *d, int u) for (i = Total = 0; chunk_info[i]; i++) Total += chunk_info[i]->size; -#ifndef PC98 +#ifdef PC98 + if (d->bios_cyl >= 65536 || d->bios_hd > 16 || d->bios_sect >= 256) { +#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" @@ -111,7 +114,6 @@ print_chunks(Disk *d, int u) d->bios_cyl, d->bios_hd, d->bios_sect, d->name); Sanitize_Bios_Geom(d); } -#endif attrset(A_NORMAL); mvaddstr(0, 0, "Disk name:\t"); clrtobot(); diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index 992512b..78e700f 100644 --- a/usr.sbin/sysinstall/disks.c +++ b/usr.sbin/sysinstall/disks.c @@ -96,8 +96,11 @@ print_chunks(Disk *d, int u) for (i = Total = 0; chunk_info[i]; i++) Total += chunk_info[i]->size; -#ifndef PC98 +#ifdef PC98 + if (d->bios_cyl >= 65536 || d->bios_hd > 16 || d->bios_sect >= 256) { +#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" @@ -111,7 +114,6 @@ print_chunks(Disk *d, int u) d->bios_cyl, d->bios_hd, d->bios_sect, d->name); Sanitize_Bios_Geom(d); } -#endif attrset(A_NORMAL); mvaddstr(0, 0, "Disk name:\t"); clrtobot(); |