summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-01-28 04:35:05 +0000
committerphk <phk@FreeBSD.org>1995-01-28 04:35:05 +0000
commit5eca39107f77d4b9db3d9a0d62839aa0c51ee140 (patch)
tree65edd372bc3c5635e85cbba3a1f601789d41cd47 /sbin
parent76f0435d2488ec4935a0450594f0c8276433273a (diff)
downloadFreeBSD-src-5eca39107f77d4b9db3d9a0d62839aa0c51ee140.zip
FreeBSD-src-5eca39107f77d4b9db3d9a0d62839aa0c51ee140.tar.gz
Make Jordan a little happier by fixing a couple of bogons.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/sysinstall/label.c6
-rw-r--r--sbin/sysinstall/mbr.c22
2 files changed, 17 insertions, 11 deletions
diff --git a/sbin/sysinstall/label.c b/sbin/sysinstall/label.c
index 2b0d5f4..fd0b76e 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 <stdlib.h>
@@ -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 750b731..c47e1be 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<NDOSPART;i++) {
+ if(dp[i].dp_start == 0 && dp[i].dp_typ== MBR_PTYPE_FreeBSD) {
+ grumble = "Boot manager not needed."
+ break;
+ }
+ }
+ if (!grumble)
+ write_bootcode(Dfd[diskno]);
grumble = "Wrote boot manager";
break;
@@ -470,9 +478,6 @@ Press any key to return to FDISK editor...
break;
case 'w': case 'W':
- strcpy(buf, "N");
- i = AskEm(stdscr, "Confirm write> ", 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;
OpenPOWER on IntegriCloud