Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/i386/stand/lib Pull up revision 1.13 (requeste...



details:   https://anonhg.NetBSD.org/src/rev/ee918d022d15
branches:  netbsd-1-5
changeset: 490576:ee918d022d15
user:      he <he%NetBSD.org@localhost>
date:      Sat Feb 03 18:04:08 2001 +0000

description:
Pull up revision 1.13 (requested by lukem):
  Add support for booting off RAIDframe RAID1 mirrors.  Done by
  checking the first partition type in biosdiskopen(), and if it
  is of type FS_RAID, add 64 to d->b_off.

  NOTE: installboot(8) still needs some hacking to DTRT, but at
  least this way if you can load "/boot" off another partition
  (e.g, wd0h), then wd0a can be of type `RAID' with a raidframe
  mirror at the start and the kernel will load OK of wd0a, and with
  raidctl -A root partitions, it will change root as well.

diffstat:

 sys/arch/i386/stand/lib/biosdisk.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 63bb6830126b -r ee918d022d15 sys/arch/i386/stand/lib/biosdisk.c
--- a/sys/arch/i386/stand/lib/biosdisk.c        Sat Feb 03 17:59:40 2001 +0000
+++ b/sys/arch/i386/stand/lib/biosdisk.c        Sat Feb 03 18:04:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: biosdisk.c,v 1.12 1999/08/03 19:46:22 drochner Exp $   */
+/*     $NetBSD: biosdisk.c,v 1.12.14.1 2001/02/03 18:04:08 he Exp $    */
 
 /*
  * Copyright (c) 1996, 1998
@@ -96,6 +96,8 @@
 static struct btinfo_bootdisk bi_disk;
 #endif
 
+#define        RF_PROTECTED_SECTORS    64      /* XXX refer to <.../rf_optnames.h> */
+
 int 
 biosdiskstrategy(devdata, flag, dblk, size, buf, rsize)
        void           *devdata;
@@ -256,6 +258,8 @@
                goto out;
        } else {
                d->boff = lp->d_partitions[partition].p_offset;
+               if (lp->d_partitions[partition].p_fstype == FS_RAID)
+                       d->boff += RF_PROTECTED_SECTORS;
 #ifdef COMPAT_OLDBOOT
                d->disktype = lp->d_type;
 #endif



Home | Main Index | Thread Index | Old Index