Fixed a bug where we would always byteswap things,

even on a big-endian machine.
This commit is contained in:
fredette 2001-12-17 21:55:13 +00:00
parent 38f679e635
commit f838750c17
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: installboot.c,v 1.2 2001/12/15 23:09:51 fredette Exp $ */ /* $NetBSD: installboot.c,v 1.3 2001/12/17 21:55:13 fredette Exp $ */
/*- /*-
* Copyright (c) 1998 The NetBSD Foundation, Inc. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -278,7 +278,7 @@ int devfd;
/* Read superblock */ /* Read superblock */
devread(devfd, sblock, SBLOCK, SBSIZE, "superblock"); devread(devfd, sblock, SBLOCK, SBSIZE, "superblock");
fs = (struct fs *)sblock; fs = (struct fs *)sblock;
needswap = (sa_be32toh(fs->fs_magic) == FS_MAGIC); needswap = (fs->fs_magic != FS_MAGIC);
if (needswap) if (needswap)
ffs_sb_swap(fs, fs); ffs_sb_swap(fs, fs);