Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/distrib/utils/sysinst/arch/bebox Pull up revision 1.23 ...



details:   https://anonhg.NetBSD.org/src/rev/9e1b2ce3bb81
branches:  netbsd-1-5
changeset: 491313:9e1b2ce3bb81
user:      he <he%NetBSD.org@localhost>
date:      Sun Apr 22 18:33:45 2001 +0000

description:
Pull up revision 1.23 (requested by briggs):
  Remove duplicate definition of "nobiosgeom"
  Update to "new" edit_mbr() and define a basic md_bios_info().

diffstat:

 distrib/utils/sysinst/arch/bebox/md.c |  29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diffs (78 lines):

diff -r 197c1ecc0be4 -r 9e1b2ce3bb81 distrib/utils/sysinst/arch/bebox/md.c
--- a/distrib/utils/sysinst/arch/bebox/md.c     Sun Apr 22 18:32:08 2001 +0000
+++ b/distrib/utils/sysinst/arch/bebox/md.c     Sun Apr 22 18:33:45 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.15.4.1 2000/10/18 17:51:20 tv Exp $ */
+/*     $NetBSD: md.c,v 1.15.4.2 2001/04/22 18:33:45 he Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -38,6 +38,8 @@
 
 /* md.c -- Machine specific code for bebox */
 
+#include <sys/param.h>
+#include <sys/sysctl.h>
 #include <stdio.h>
 #include <util.h>
 #include "defs.h"
@@ -48,7 +50,6 @@
 
 int mbr_present;
 int c1024_resp;
-
 char mbr[512];
 
 /* prototypes */
@@ -59,7 +60,7 @@
 
        read_mbr(diskdev, mbr, sizeof mbr);
        md_bios_info(diskdev);
-       return edit_mbr();
+       return edit_mbr((struct mbr_partition *) &mbr[MBR_PARTOFF]);
 }
 
 int md_pre_disklabel()
@@ -277,7 +278,7 @@
                /* XXX UGH! need arguments to process_menu */
                switch (c1024_resp) {
                case 1:
-                       edit_mbr();
+                       edit_mbr((struct mbr_partition *) &mbr[MBR_PARTOFF]);
                        /*FALLTHROUGH*/
                case 2:
                        goto editlab;
@@ -310,7 +311,7 @@
                (void)fprintf (f, "\t:p%c#%d:o%c#%d:t%c=%s:",
                               'a'+i, bsdlabel[i].pi_size,
                               'a'+i, bsdlabel[i].pi_offset,
-                              'a'+i, fstype[bsdlabel[i].pi_fstype]);
+                              'a'+i, fstypenames[bsdlabel[i].pi_fstype]);
                if (bsdlabel[i].pi_fstype == FS_BSDFFS)
                        (void)fprintf (f, "b%c#%d:f%c#%d",
                                       'a'+i, bsdlabel[i].pi_bsize,
@@ -369,6 +370,24 @@
        return 1;
 }
 
+int
+md_bios_info(dev)
+       char *dev;
+{
+       int cyl, head, sec;
+
+       msg_display(MSG_nobiosgeom, dlcyl, dlhead, dlsec);
+       if (guess_biosgeom_from_mbr(mbr, &cyl, &head, &sec) >= 0) {
+               msg_display_add(MSG_biosguess, cyl, head, sec);
+               set_bios_geom(cyl, head, sec);
+       } else
+               set_bios_geom(dlcyl, dlhead, dlsec);
+       bsize = bcyl * bhead * bsec;
+       bcylsize = bhead * bsec;
+       return 0;
+}
+
+
 void
 md_init()
 {



Home | Main Index | Thread Index | Old Index