Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/distrib/utils/sysinst/arch/mac68k Pull up revision 1.14...
details: https://anonhg.NetBSD.org/src/rev/0284b9aa8bc7
branches: netbsd-1-6
changeset: 528297:0284b9aa8bc7
user: lukem <lukem%NetBSD.org@localhost>
date: Sat Jun 29 23:24:02 2002 +0000
description:
Pull up revision 1.14 (requested by scottr in ticket #403):
Rework sysinst so that it actually works for common cases. Notably, the
partition handling has been completely rewritten to address serious data
loss issues with Mac HFS partitions, and the a.out -> ELF upgrade has
been addressed. From Bob Nestor; part 1 of 2 of a fix for PR 15528.
diffstat:
distrib/utils/sysinst/arch/mac68k/menus.md.en | 45 +++++++++++++++++---------
1 files changed, 29 insertions(+), 16 deletions(-)
diffs (153 lines):
diff -r 6bb19b9f27cc -r 0284b9aa8bc7 distrib/utils/sysinst/arch/mac68k/menus.md.en
--- a/distrib/utils/sysinst/arch/mac68k/menus.md.en Sat Jun 29 23:23:54 2002 +0000
+++ b/distrib/utils/sysinst/arch/mac68k/menus.md.en Sat Jun 29 23:24:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: menus.md.en,v 1.13 2001/11/29 23:20:58 thorpej Exp $ */
+/* $NetBSD: menus.md.en,v 1.13.2.1 2002/06/29 23:24:02 lukem Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -82,6 +82,7 @@
option "Split selected partition", action {
int i, j, k, size, free_size;
char buf[40];
+ EBZB *bzb;
j = map.mblk[map.selected];
msg_display(MSG_split_part, map.blk[j].pmPartBlkCnt);
@@ -96,6 +97,9 @@
strcpy (map.blk[j].pmPartType, "Apple_Scratch");
map.blk[j].pmPartBlkCnt = size;
map.blk[j].pmDataCnt = size;
+ bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
+ bzb->magic = 0;
+ bzb->mount_point[0] = '\0';
strcpy (map.blk[k].pmPartType, "Apple_Free");
map.blk[k].pmPyPartStart += size;
if ((map.blk[k].pmPyPartStart + free_size) > dlsize)
@@ -104,7 +108,11 @@
else
map.blk[k].pmPartBlkCnt = free_size;
map.blk[k].pmDataCnt = map.blk[k].pmPartBlkCnt;
- map.in_use_cnt += 1;
+ bzb = (EBZB *)&map.blk[k].pmBootArgs[0];
+ bzb->magic = 0;
+ bzb->mount_point[0] = '\0';
+ map.in_use_cnt += 1; /* Count new part as usable */
+ sortmerge();
} else {
msg_display (MSG_diskfull);
process_menu (MENU_okabort);
@@ -143,18 +151,20 @@
};
-menu okabort, title "What do you want to do?";
- option "OK", exit, action { yesno = 1; };
+menu ok2, title "Abort?", y=17;
+ option "OK", exit, action { };
+
+menu okabort, title "What do you want to do?", y=17;
+ option "Continue", exit, action { yesno = 1; };
option "Abort install", exit, action { yesno = 0; };
menu chooseid, title "Partition Type?";
option "NetBSD Root", exit, action {
int i, j;
- char fstyp[16], use[16], name[64];
EBZB *bzb;
j = map.mblk[map.selected];
- reset_part_flags(j);
+ reset_part_flags(&map.blk[j]);
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
bzb->magic = BZB_MAGIC;
strcpy (map.blk[j].pmPartType, "Apple_Unix_SVR2");
@@ -169,7 +179,7 @@
*/
for (i=0,map.root_cnt=0;i<map.usable_cnt;i++) {
j = map.mblk[i];
- if (part_type(j, fstyp, use, name) == TYP_BSD) {
+ if (whichType(&map.blk[j]) == ROOT_PART) {
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
if (bzb->type == BZB_TYPEFS && bzb->flags.root) {
if (map.root_cnt++ == 0)
@@ -184,7 +194,7 @@
EBZB *bzb;
j = map.mblk[map.selected];
- reset_part_flags(j);
+ reset_part_flags(&map.blk[j]);
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
bzb->magic = BZB_MAGIC;
strcpy (map.blk[j].pmPartType, "Apple_Unix_SVR2");
@@ -194,13 +204,13 @@
EBZB *bzb;
j = map.mblk[map.selected];
- reset_part_flags(j);
+ reset_part_flags(&map.blk[j]);
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
bzb->magic = BZB_MAGIC;
strcpy (map.blk[j].pmPartType, "Apple_Unix_SVR2");
bzb->type = BZB_TYPEFS;
bzb->flags.usr = 1;
- if (!map.usr_cnt)
+ if (map.usr_cnt++ == 0)
strcpy (bzb->mount_point, "/usr");
};
option "NetBSD Root&Usr", exit, action {
@@ -208,17 +218,17 @@
EBZB *bzb;
j = map.mblk[map.selected];
- reset_part_flags(j);
+ reset_part_flags(&map.blk[j]);
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
bzb->magic = BZB_MAGIC;
strcpy (map.blk[j].pmPartType, "Apple_Unix_SVR2");
bzb->type = BZB_TYPEFS;
bzb->flags.root = 1;
bzb->flags.usr = 1;
- if (!map.root_cnt)
+ if (map.root_cnt++ == 0)
strcpy (bzb->mount_point, "/");
else {
- if (!map.usr_cnt)
+ if (map.usr_cnt++ == 0)
strcpy (bzb->mount_point, "/usr");
} };
option "MacOS HFS", exit, action {
@@ -226,8 +236,9 @@
EBZB *bzb;
j = map.mblk[map.selected];
- reset_part_flags(j);
+ reset_part_flags(&map.blk[j]);
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
+ bzb->magic = 0;
bzb->mount_point[0] = '\0';
strcpy (map.blk[j].pmPartType, "Apple_HFS"); };
option "Scratch", exit, action {
@@ -235,8 +246,9 @@
EBZB *bzb;
j = map.mblk[map.selected];
- reset_part_flags(j);
+ reset_part_flags(&map.blk[j]);
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
+ bzb->magic = 0;
bzb->mount_point[0] = '\0';
strcpy (map.blk[j].pmPartType, "Apple_Scratch"); };
option "Free", exit, action {
@@ -244,8 +256,9 @@
EBZB *bzb;
j = map.mblk[map.selected];
- reset_part_flags(j);
+ reset_part_flags(&map.blk[j]);
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
+ bzb->magic = 0;
bzb->mount_point[0] = '\0';
strcpy (map.blk[j].pmPartType, "Apple_Free"); };
Home |
Main Index |
Thread Index |
Old Index