diff options
author | phk <phk@FreeBSD.org> | 1994-11-06 04:05:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1994-11-06 04:05:45 +0000 |
commit | 3ae26fefe1eeeb3d3557563028e40d049143d6cf (patch) | |
tree | 38f2f652d8297017bde394547528014cc8ba5bcb | |
parent | 22ae5593ea6004be045c27d261919d568d080371 (diff) | |
download | FreeBSD-src-3ae26fefe1eeeb3d3557563028e40d049143d6cf.zip FreeBSD-src-3ae26fefe1eeeb3d3557563028e40d049143d6cf.tar.gz |
label.c Make sure we always show 8 disk-partitions.
main.c sanitize the logic of what we do when:
if(getpid()!=1) do stage0 & stage1 (very useful actually)
else if (floppy-marker-file is there) stage0-2, reboot
else stage3-5
-rw-r--r-- | sbin/sysinstall/label.c | 8 | ||||
-rw-r--r-- | sbin/sysinstall/main.c | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/sbin/sysinstall/label.c b/sbin/sysinstall/label.c index d821cfb..a57e6a9 100644 --- a/sbin/sysinstall/label.c +++ b/sbin/sysinstall/label.c @@ -430,6 +430,12 @@ DiskLabel() hd = lbl->d_ntracks; sec = lbl->d_nsectors; tsec = lbl->d_secperunit; + for (i = lbl->d_npartitions; i < MAXPARTITIONS; i++) { + lbl->d_partitions[i].p_offset = 0; + lbl->d_partitions[i].p_size = 0; + lbl->d_partitions[i].p_fstype = 0; + } + lbl->d_npartitions = MAXPARTITIONS; while(!done) { clear(); standend(); if (yip) { @@ -447,8 +453,6 @@ DiskLabel() mvprintw(j++, 0, "Part Start End Blocks MB Type Mountpoint"); for (i = 0; i < MAXPARTITIONS; i++) { mvprintw(j++, 0, "%c ", 'a'+i); - if (i >= lbl->d_npartitions) - continue; printw(" %8u %8u %8u %5u ", lbl->d_partitions[i].p_offset, lbl->d_partitions[i].p_offset+ diff --git a/sbin/sysinstall/main.c b/sbin/sysinstall/main.c index 8ae6466..0afcac7 100644 --- a/sbin/sysinstall/main.c +++ b/sbin/sysinstall/main.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: main.c,v 1.9 1994/10/29 10:01:34 phk Exp $ + * $Id: main.c,v 1.10 1994/11/01 10:10:24 phk Exp $ * */ @@ -69,12 +69,15 @@ main(int argc, char **argv) if (alloc_memory() < 0) Fatal("No memory\n"); - setjmp(jmp_restart); /* XXX Allow people to "restart" */ - - if (getenv("STAGE0") || !access("/this_is_boot_flp",R_OK)) { + if (getpid() != 1) { + stage0(); + stage1(); + } else if (!access("/this_is_boot_flp",R_OK)) { stage0(); stage1(); stage2(); + end_dialog(); + dialog_active=0; reboot(RB_AUTOBOOT); } else { stage3(); |