Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/installboot Fix two mistakes done in the UFS2 merge:
details: https://anonhg.NetBSD.org/src/rev/9fe87064ae05
branches: trunk
changeset: 545231:9fe87064ae05
user: he <he%NetBSD.org@localhost>
date: Sat Apr 05 11:30:53 2003 +0000
description:
Fix two mistakes done in the UFS2 merge:
o Correct the order of arguments to ffs_read_disk_block; the second one
is blocknumber to read, not the size to be read. This would affect the
UFS2 code, and is thus not much excercised at the moment.
o The offsets in SBLOCKSEARCH are in bytes, but ffs_read_disk_block wants
its location in terms of DEV_BSIZE blocks. Fix this bug in ffs_match().
The latter together with the recent magic number fix to <ufs/ffs/fs.h>
fixes a cross build problem seen when doing a i386->sparc build.
diffstat:
usr.sbin/installboot/ffs.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 80d5d0c06c17 -r 9fe87064ae05 usr.sbin/installboot/ffs.c
--- a/usr.sbin/installboot/ffs.c Sat Apr 05 11:12:42 2003 +0000
+++ b/usr.sbin/installboot/ffs.c Sat Apr 05 11:30:53 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.c,v 1.10 2003/04/02 23:02:29 he Exp $ */
+/* $NetBSD: ffs.c,v 1.11 2003/04/05 11:30:53 he Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.10 2003/04/02 23:02:29 he Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.11 2003/04/05 11:30:53 he Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -133,7 +133,7 @@
assert(state != NULL);
/* Read the superblock. */
- if (!ffs_read_disk_block(params, SBLOCKSIZE, params->fstype->sblockloc,
+ if (!ffs_read_disk_block(params, params->fstype->sblockloc, SBLOCKSIZE,
sbbuf))
return (0);
fs = (struct fs *)sbbuf;
@@ -264,7 +264,7 @@
assert(state != NULL);
/* Read the superblock. */
- if (!ffs_read_disk_block(params, SBLOCKSIZE, params->fstype->sblockloc,
+ if (!ffs_read_disk_block(params, params->fstype->sblockloc, SBLOCKSIZE,
sbbuf))
return (0);
fs = (struct fs *)sbbuf;
@@ -458,7 +458,7 @@
fs = (struct fs *)sbbuf;
for (i = 0; sblock_try[i] != -1; i++) {
- loc = sblock_try[i];
+ loc = sblock_try[i] / DEV_BSIZE;
if (!ffs_read_disk_block(params, loc, SBLOCKSIZE, sbbuf))
continue;
switch (fs->fs_magic) {
Home |
Main Index |
Thread Index |
Old Index