Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst/arch/acorn32 Implement (/copy) from th...
details: https://anonhg.NetBSD.org/src/rev/0d6226ff3bbb
branches: trunk
changeset: 522278:0d6226ff3bbb
user: reinoud <reinoud%NetBSD.org@localhost>
date: Fri Feb 15 00:40:23 2002 +0000
description:
Implement (/copy) from the generic way the option to keep the existing disk
layout... this was missing for quite some time.
diffstat:
distrib/utils/sysinst/arch/acorn32/md.c | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diffs (48 lines):
diff -r daed2e82794c -r 0d6226ff3bbb distrib/utils/sysinst/arch/acorn32/md.c
--- a/distrib/utils/sysinst/arch/acorn32/md.c Thu Feb 14 22:10:56 2002 +0000
+++ b/distrib/utils/sysinst/arch/acorn32/md.c Fri Feb 15 00:40:23 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.1 2002/01/31 00:33:49 reinoud Exp $ */
+/* $NetBSD: md.c,v 1.2 2002/02/15 00:40:23 reinoud Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -300,6 +300,7 @@
int remain;
char isize[20];
int maxpart = getmaxpartitions();
+ struct disklabel l;
/*
* Initialize global variables that track space used on this disk.
@@ -456,6 +457,30 @@
}
break;
+
+ case 4: /* use existing disklabel */
+
+ if (get_real_geom(diskdev, &l) == 0) {
+ msg_display(MSG_abort); /* XXX more informative */
+ return 0;
+ }
+
+ for (i = 0; i < maxpart; i++) {
+#define p l.d_partitions[i]
+ bsdlabel[i].pi_size = p.p_size;
+ bsdlabel[i].pi_offset = p.p_offset;
+ if (i != RAW_PART) {
+ bsdlabel[i].pi_fstype = p.p_fstype;
+ bsdlabel[i].pi_bsize = p.p_fsize * p.p_frag;
+ bsdlabel[i].pi_fsize = p.p_fsize;
+ /* menu to get fsmount[] entry */
+#undef p
+ } else
+ bsdlabel[i].pi_fstype = FS_UNUSED;
+ }
+ msg_display(MSG_postuseexisting);
+ getchar();
+ break;
}
/*
Home |
Main Index |
Thread Index |
Old Index