From 5eca39107f77d4b9db3d9a0d62839aa0c51ee140 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 28 Jan 1995 04:35:05 +0000 Subject: [PATCH] Make Jordan a little happier by fixing a couple of bogons. --- sbin/sysinstall/label.c | 6 +----- sbin/sysinstall/mbr.c | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/sbin/sysinstall/label.c b/sbin/sysinstall/label.c index 2b0d5f4d7a65..fd0b76eded8b 100644 --- a/sbin/sysinstall/label.c +++ b/sbin/sysinstall/label.c @@ -1,5 +1,5 @@ /* - * $Id: label.c,v 1.23.2.2 1994/11/21 03:53:45 phk Exp $ + * $Id: label.c,v 1.31 1994/12/27 23:26:51 jkh Exp $ */ #include @@ -310,10 +310,6 @@ Press any key to return to Disklabel editor... break; case 'a': case 'A': - if (memcmp(lbl, Dlbl[diskno], sizeof *lbl)) { - yip = "Please (W)rite changed partition information first"; - break; - } j = AskWhichPartition("Assign which partition> "); if (j < 0) { yip = "Invalid partition"; diff --git a/sbin/sysinstall/mbr.c b/sbin/sysinstall/mbr.c index 750b731cc2f5..c47e1bed4a5f 100644 --- a/sbin/sysinstall/mbr.c +++ b/sbin/sysinstall/mbr.c @@ -300,7 +300,7 @@ Fdisk() } mvprintw(20, 0, "Commands available: "); mvprintw(21, 0, "(H)elp (T)utorial (D)elete (E)dit (R)eread (W)rite MBR (Q)uit"); - mvprintw(22, 0, "(U)se entire disk for FreeBSD (G)eometry Write MBR (B)ootcode"); + mvprintw(22, 0, "(U)se entire disk for FreeBSD (G)eometry use (B)oot manager"); if (grumble) { standout(); mvprintw(24, 0, grumble); @@ -334,7 +334,7 @@ Advanced commands: (U)se entire disk for FreeBSD - Assign ALL disk space on current drive (G)eometry - Edit the default disk geometry settings -Write MBR (B)ootcode - Install multi-OS bootmanager. +Write (B)oot manager - Install multi-OS bootmanager. Press any key to return to FDISK editor... @@ -351,7 +351,15 @@ Press any key to return to FDISK editor... break; case 'b': case 'B': - write_bootcode(Dfd[diskno]); + grumble = 0; + for(i=0;i ", buf, 2); - if(*buf != 'y' && *buf != 'Y') break; write_dospart(Dfd[diskno], dp); Dlbl[diskno]->d_partitions[OURPART].p_offset = 0; Dlbl[diskno]->d_partitions[OURPART].p_size = 0; @@ -482,8 +487,13 @@ Press any key to return to FDISK editor... dp[i].dp_start; Dlbl[diskno]->d_partitions[OURPART].p_size = dp[i].dp_size; + goto wok; } } + grumble = "No FreeBSD slice, cannot write."; + break; + + wok: Dlbl[diskno]->d_ntracks = hd; Dlbl[diskno]->d_nsectors = sec; Dlbl[diskno]->d_ncylinders = cyl;