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/bebox Make this compile again:



details:   https://anonhg.NetBSD.org/src/rev/b7bcdccb51d9
branches:  trunk
changeset: 508484:b7bcdccb51d9
user:      briggs <briggs%NetBSD.org@localhost>
date:      Thu Apr 12 03:48:12 2001 +0000

description:
Make this compile again:
        * 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 ++++++++++++++++++++++++-----
 distrib/utils/sysinst/arch/bebox/msg.md.en |  21 +--------------------
 2 files changed, 25 insertions(+), 25 deletions(-)

diffs (113 lines):

diff -r 0a2ce637221c -r b7bcdccb51d9 distrib/utils/sysinst/arch/bebox/md.c
--- a/distrib/utils/sysinst/arch/bebox/md.c     Thu Apr 12 03:16:56 2001 +0000
+++ b/distrib/utils/sysinst/arch/bebox/md.c     Thu Apr 12 03:48:12 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.22 2001/01/14 02:38:18 mrg Exp $ */
+/*     $NetBSD: md.c,v 1.23 2001/04/12 03:48:12 briggs 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,
@@ -372,6 +373,24 @@
 {
 }
 
+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_set_sizemultname()
 {
diff -r 0a2ce637221c -r b7bcdccb51d9 distrib/utils/sysinst/arch/bebox/msg.md.en
--- a/distrib/utils/sysinst/arch/bebox/msg.md.en        Thu Apr 12 03:16:56 2001 +0000
+++ b/distrib/utils/sysinst/arch/bebox/msg.md.en        Thu Apr 12 03:48:12 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.md.en,v 1.10 2000/12/03 01:54:48 minoura Exp $     */
+/*     $NetBSD: msg.md.en,v 1.11 2001/04/12 03:48:13 briggs Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -72,25 +72,6 @@
 real geometry: %d cylinders, %d heads, %d sectors 
 }
 
-message nobiosgeom
-{It appears that your disk, %s, did not have a valid Master Boot
-Record (MBR). This program gets the BIOS geometry of your disk by
-reading the MBR, so the BIOS geometry of your disk could not
-be determined in this case.  Your options are:
-
-* Abort the install. You can determine the actual BIOS geometry in your
-BIOS setup and then come back and enter the values. Or you can use
-another setup program to initialize the MBR first.
-
-* Enter the BIOS geometry values yourself. Sysinst will initialize the MBR
-for you.
-
-WARNING: Entering a new geometry will cause this program to initialize
-your master boot record (MBR) and destroy any boot program you may
-have installed.
-
-}
-
 message diagcyl
 {Some old BIOSs or old diagnostic programs may use the last cylinder of
 the disk for test purposes. This should no longer be the case with



Home | Main Index | Thread Index | Old Index