summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/disks.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-31 06:20:59 +0000
committerjkh <jkh@FreeBSD.org>1996-07-31 06:20:59 +0000
commit7bb847443d746dbfcb7ea818538d2f42b1921364 (patch)
treecc2ecdeb856d895ae030139b6745edde8dae0e30 /release/sysinstall/disks.c
parentebd61ccfa419fe49187d41abb787fbc6445fe8d1 (diff)
downloadFreeBSD-src-7bb847443d746dbfcb7ea818538d2f42b1921364.zip
FreeBSD-src-7bb847443d746dbfcb7ea818538d2f42b1921364.tar.gz
Detect which partitions have already been created with `auto' so as not to create them
twice. Various cosmetic tweaks.
Diffstat (limited to 'release/sysinstall/disks.c')
-rw-r--r--release/sysinstall/disks.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index 21dbe87..df857ef 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.54 1996/07/05 08:35:52 jkh Exp $
+ * $Id: disks.c,v 1.55 1996/07/09 03:07:47 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -70,24 +70,27 @@ print_chunks(Disk *d)
int row;
int i;
- if ((!d->bios_cyl || d->bios_cyl > 65536) || (!d->bios_hd || d->bios_hd > 256) || (!d->bios_sect || d->bios_sect >= 64)) {
+ if (!d->bios_cyl && !d->bios_hd && !d->bios_sect) {
+ All_FreeBSD(d, TRUE);
+ d->bios_hd = d->bios_sect = d->bios_cyl = 1;
+ }
+ else if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) {
int sz;
dialog_clear();
- msgConfirm("WARNING: The current geometry for %s is incorrect. Using\n"
+ msgConfirm("WARNING: A geometry of %d/%d/%d for %s is incorrect. Using\n"
"a default geometry of 64 heads and 32 sectors. If this geometry\n"
"is incorrect or you are unsure as to whether or not it's correct,\n"
"please consult the Hardware Guide in the Documentation submenu\n"
- "or use the (G)eometry command to change it now.", d->name);
+ "or use the (G)eometry command to change it now.", d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
d->bios_hd = 64;
d->bios_sect = 32;
- sz = 0;
- for (i = 0; chunk_info[i]; i++)
+ for (i = sz = 0; chunk_info[i]; i++)
sz += chunk_info[i]->size;
if (sz)
d->bios_cyl = sz / ONE_MEG;
else
- msgConfirm("Couldn't set geometry! You'll have to do it by hand.");
+ msgConfirm("Couldn't calculate disk size! You'll have to set the geometry by hand.");
}
attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t");
OpenPOWER on IntegriCloud