Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ffs Handle pre-FS_42POSTBLFMT. I now can mount an Ul...



details:   https://anonhg.NetBSD.org/src/rev/0c3dc43d90a7
branches:  trunk
changeset: 480708:0c3dc43d90a7
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Jan 18 18:41:29 2000 +0000

description:
Handle pre-FS_42POSTBLFMT. I now can mount an Ultrix file system on my
sparc without panic.

diffstat:

 sys/ufs/ffs/ffs_bswap.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 60e5bd0f2720 -r 0c3dc43d90a7 sys/ufs/ffs/ffs_bswap.c
--- a/sys/ufs/ffs/ffs_bswap.c   Tue Jan 18 17:20:32 2000 +0000
+++ b/sys/ufs/ffs/ffs_bswap.c   Tue Jan 18 18:41:29 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_bswap.c,v 1.6 1999/09/14 04:50:54 thorpej Exp $    */
+/*     $NetBSD: ffs_bswap.c,v 1.7 2000/01/18 18:41:29 bouyer Exp $     */
 
 /*
  * Copyright (c) 1998 Manuel Bouyer.
@@ -82,8 +82,10 @@
        n16 = (ufs_rw32(o->fs_postblformat, ns) == FS_42POSTBLFMT)
            ? n->fs_opostbl[0]
            : (int16_t *)((u_int8_t *)n + ufs_rw32(n->fs_postbloff, ns));
-       for (i = 0;
-            i < ufs_rw32(o->fs_cpc, ns) * ufs_rw32(o->fs_nrpos, ns);
+       for (i = 0; i < (
+                (ufs_rw32(o->fs_postblformat, ns) == FS_42POSTBLFMT) ?
+                168 : /* fs_opostbl[16][8] */
+                ufs_rw32(o->fs_cpc, ns) * ufs_rw32(o->fs_nrpos, ns));
             i++)
                n16[i] = bswap16(o16[i]);
 }



Home | Main Index | Thread Index | Old Index