Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/stand/ofwboot bump offset by RF_PROTECTED_SEC...



details:   https://anonhg.NetBSD.org/src/rev/df7601e91a49
branches:  trunk
changeset: 534559:df7601e91a49
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 29 14:34:12 2002 +0000

description:
bump offset by RF_PROTECTED_SECTORS if FS_RAID

diffstat:

 sys/arch/sparc/stand/ofwboot/ofdev.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 54f849534ea3 -r df7601e91a49 sys/arch/sparc/stand/ofwboot/ofdev.c
--- a/sys/arch/sparc/stand/ofwboot/ofdev.c      Mon Jul 29 14:26:21 2002 +0000
+++ b/sys/arch/sparc/stand/ofwboot/ofdev.c      Mon Jul 29 14:34:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $    */
+/*     $NetBSD: ofdev.c,v 1.2 2002/07/29 14:34:12 mrg Exp $    */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -52,6 +52,8 @@
 
 extern char bootdev[];
 
+#define RF_PROTECTED_SECTORS 64                /* XXX */
+
 /*
  * This is ugly.  A path on a sparc machine is something like this:
  *
@@ -489,6 +491,13 @@
                        printf("devopen: setting partition %d offset %x\n",
                               part, ofdev.partoff);
 #endif
+                       if (label.d_partitions[part].p_fstype == FS_RAID) {
+                               ofdev.partoff += RF_PROTECTED_SECTORS;
+#ifdef NOTDEF_DEBUG
+                               printf("devopen: found RAID partition, "
+                                   "adjusting offset to %x", ofdev.partoff);
+#endif
+                       }
                }
                
                of->f_dev = devsw;



Home | Main Index | Thread Index | Old Index