Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/stand/boot_ufs A better fix for PR kern/24809, ...



details:   https://anonhg.NetBSD.org/src/rev/8371fa83a834
branches:  trunk
changeset: 559633:8371fa83a834
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sun Mar 21 12:46:57 2004 +0000

description:
A better fix for PR kern/24809, old filesystems should work ok now!

diffstat:

 sys/arch/x68k/stand/boot_ufs/readufs_ffs.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 9ce6f48e0f72 -r 8371fa83a834 sys/arch/x68k/stand/boot_ufs/readufs_ffs.c
--- a/sys/arch/x68k/stand/boot_ufs/readufs_ffs.c        Sun Mar 21 12:37:48 2004 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/readufs_ffs.c        Sun Mar 21 12:46:57 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readufs_ffs.c,v 1.5 2004/03/20 14:16:32 dsl Exp $      */
+/*     $NetBSD: readufs_ffs.c,v 1.6 2004/03/21 12:46:57 dsl Exp $      */
 /*     from Id: readufs_ffs.c,v 1.6 2003/04/08 09:19:32 itohy Exp      */
 
 /*
@@ -50,9 +50,15 @@
 #ifdef DEBUG_WITH_STDIO
                printf("FFS: sblk: pos %d magic 0x%x\n", btodb(*sbl), magic);
 #endif
-               if (*sbl != buf.sblk.fs_sblockloc)
-                       /* must be an alternate suberblock */
-                       continue;
+               if (buf.sblk.fs_old_flags & FS_FLAGS_UPDATED) {
+                       if (*sbl != buf.sblk.fs_sblockloc)
+                               /* must be an alternate suberblock */
+                               continue;
+               } else {
+                       if (*sbl == SBLOCK_UFS2)
+                               /* might be an alternate suberblock */
+                               continue;
+               }
 
 #ifdef USE_UFS1
                if (magic == FS_UFS1_MAGIC)



Home | Main Index | Thread Index | Old Index