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/i386 make 'use existing partition...



details:   https://anonhg.NetBSD.org/src/rev/050bea1ee020
branches:  trunk
changeset: 534744:050bea1ee020
user:      grant <grant%NetBSD.org@localhost>
date:      Fri Aug 02 10:28:17 2002 +0000

description:
make 'use existing partitions' work on i386.

patch provided by Tyler Retzlaff, fixes install/17747.

diffstat:

 distrib/utils/sysinst/arch/i386/md.c |  23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diffs (44 lines):

diff -r 9b19c9abfb3b -r 050bea1ee020 distrib/utils/sysinst/arch/i386/md.c
--- a/distrib/utils/sysinst/arch/i386/md.c      Fri Aug 02 08:43:09 2002 +0000
+++ b/distrib/utils/sysinst/arch/i386/md.c      Fri Aug 02 10:28:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.63 2002/08/02 05:11:33 grant Exp $ */
+/*     $NetBSD: md.c,v 1.64 2002/08/02 10:28:17 grant Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -241,6 +241,7 @@
        FILE *f;
        int i;
        int maxpart = getmaxpartitions();
+       struct disklabel l;
 
 editlab:
        /* Ask for layout type -- standard or special */
@@ -332,6 +333,26 @@
 
        case 3:
 custom:
+
+       case 4: /* use existing parts */
+               if (get_real_geom(diskdev, &l) == 0) {
+                       msg_display(MSG_abort);
+                       return 0;
+               }
+
+#define p l.d_partitions[i]
+               for (i = 0; i < maxpart; i++) {
+                       bsdlabel[i].pi_size = p.p_size;
+                       bsdlabel[i].pi_offset = p.p_offset;
+                       bsdlabel[i].pi_fstype = p.p_fstype;
+                       bsdlabel[i].pi_bsize  = p.p_fsize * p.p_frag;
+                       bsdlabel[i].pi_fsize  = p.p_fsize;
+               }
+#undef p
+
+               msg_display(MSG_postuseexisting);
+               getchar();
+               break;
        }
 
        /*



Home | Main Index | Thread Index | Old Index