Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/ufs/ffs Pull up revision 1.7 (requested by bouyer):
details: https://anonhg.NetBSD.org/src/rev/2ffaa2eabd60
branches: netbsd-1-4
changeset: 470090:2ffaa2eabd60
user: he <he%NetBSD.org@localhost>
date: Tue Jan 18 20:08:41 2000 +0000
description:
Pull up revision 1.7 (requested by bouyer):
Properly handle pre-FS_42POSTBLFMT file systems (e.g. Ultrix) in
the endian-independent file system code.
diffstat:
sys/ufs/ffs/ffs_bswap.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r 30169b9e7e1d -r 2ffaa2eabd60 sys/ufs/ffs/ffs_bswap.c
--- a/sys/ufs/ffs/ffs_bswap.c Tue Jan 18 20:05:21 2000 +0000
+++ b/sys/ufs/ffs/ffs_bswap.c Tue Jan 18 20:08:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_bswap.c,v 1.5 1998/08/09 20:15:39 perry Exp $ */
+/* $NetBSD: ffs_bswap.c,v 1.5.6.1 2000/01/18 20:08:41 he Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@@ -78,8 +78,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