diff options
author | 2010-03-08 11:19:04 +0000 | |
---|---|---|
committer | 2010-03-08 11:19:04 +0000 | |
commit | 3c4b0c78787306d33e6299902538f2694429724c (patch) | |
tree | 6e9fc84586f246c0e4bfc1e7839811fa2755e828 | |
parent | sort the list of constraints (to -O); ok djm (diff) | |
download | wireguard-openbsd-3c4b0c78787306d33e6299902538f2694429724c.tar.xz wireguard-openbsd-3c4b0c78787306d33e6299902538f2694429724c.zip |
if ncg == 1, there's no alternate superblock; from NetBSD; ok deraadt@
-rw-r--r-- | sbin/fsck_ext2fs/setup.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/fsck_ext2fs/setup.c b/sbin/fsck_ext2fs/setup.c index 06cc0dbdc82..febaf3fb99d 100644 --- a/sbin/fsck_ext2fs/setup.c +++ b/sbin/fsck_ext2fs/setup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setup.c,v 1.15 2007/09/02 15:19:23 deraadt Exp $ */ +/* $OpenBSD: setup.c,v 1.16 2010/03/08 11:19:04 otto Exp $ */ /* $NetBSD: setup.c,v 1.1 1997/06/11 11:22:01 bouyer Exp $ */ /* @@ -297,6 +297,12 @@ readsb(int listerr) dev_bsize = sblock.e2fs_bsize / fsbtodb(&sblock, 1); sblk.b_bno = super / dev_bsize; + if (sblock.e2fs_ncg == 1) { + /* no alternate superblock; assume it's okey */ + havesb = 1; + return 1; + } + getblk(&asblk, 1 * sblock.e2fs.e2fs_bpg + sblock.e2fs.e2fs_first_dblock, (long)SBSIZE); if (asblk.b_errs) |