Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src use FS_UFS[12]_MAGIC_SWAPPED instead of bswap32(FS_UFS[12]_M...
details: https://anonhg.NetBSD.org/src/rev/1af31fde5627
branches: trunk
changeset: 773158:1af31fde5627
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sun Jan 29 00:58:13 2012 +0000
description:
use FS_UFS[12]_MAGIC_SWAPPED instead of bswap32(FS_UFS[12]_MAGIC).
diffstat:
sbin/fsck_ffs/setup.c | 10 +++++-----
sys/ufs/ffs/ffs_vfsops.c | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diffs (74 lines):
diff -r 6b2aa472dcee -r 1af31fde5627 sbin/fsck_ffs/setup.c
--- a/sbin/fsck_ffs/setup.c Sun Jan 29 00:50:59 2012 +0000
+++ b/sbin/fsck_ffs/setup.c Sun Jan 29 00:58:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.94 2011/08/14 12:32:01 christos Exp $ */
+/* $NetBSD: setup.c,v 1.95 2012/01/29 00:58:13 nonaka Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95";
#else
-__RCSID("$NetBSD: setup.c,v 1.94 2011/08/14 12:32:01 christos Exp $");
+__RCSID("$NetBSD: setup.c,v 1.95 2012/01/29 00:58:13 nonaka Exp $");
#endif
#endif /* not lint */
@@ -692,7 +692,7 @@
detect_byteorder(struct fs *fs, int sblockoff)
{
if (sblockoff == SBLOCK_UFS2 && (fs->fs_magic == FS_UFS1_MAGIC ||
- fs->fs_magic == bswap32(FS_UFS1_MAGIC)))
+ fs->fs_magic == FS_UFS1_MAGIC_SWAPPED))
/* Likely to be the first alternate of a fs with 64k blocks */
return -1;
if (fs->fs_magic == FS_UFS1_MAGIC || fs->fs_magic == FS_UFS2_MAGIC) {
@@ -704,8 +704,8 @@
doswap = do_blkswap = do_dirswap = 1;
}
return 0;
- } else if (fs->fs_magic == bswap32(FS_UFS1_MAGIC) ||
- fs->fs_magic == bswap32(FS_UFS2_MAGIC)) {
+ } else if (fs->fs_magic == FS_UFS1_MAGIC_SWAPPED ||
+ fs->fs_magic == FS_UFS2_MAGIC_SWAPPED) {
if (endian == 0 || BYTE_ORDER != endian) {
needswap = 1;
doswap = do_blkswap = do_dirswap = 0;
diff -r 6b2aa472dcee -r 1af31fde5627 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Sun Jan 29 00:50:59 2012 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Sun Jan 29 00:58:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.274 2012/01/28 00:00:06 rmind Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.275 2012/01/29 00:58:14 nonaka Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.274 2012/01/28 00:00:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275 2012/01/29 00:58:14 nonaka Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -927,7 +927,7 @@
fsbsize = fs->fs_bsize;
#ifdef FFS_EI
needswap = 0;
- } else if (fs->fs_magic == bswap32(FS_UFS1_MAGIC)) {
+ } else if (fs->fs_magic == FS_UFS1_MAGIC_SWAPPED) {
sbsize = bswap32(fs->fs_sbsize);
fstype = UFS1;
fsbsize = bswap32(fs->fs_bsize);
@@ -939,7 +939,7 @@
fsbsize = fs->fs_bsize;
#ifdef FFS_EI
needswap = 0;
- } else if (fs->fs_magic == bswap32(FS_UFS2_MAGIC)) {
+ } else if (fs->fs_magic == FS_UFS2_MAGIC_SWAPPED) {
sbsize = bswap32(fs->fs_sbsize);
fstype = UFS2;
fsbsize = bswap32(fs->fs_bsize);
Home |
Main Index |
Thread Index |
Old Index