Module Name: src
Committed By: jdolecek
Date: Mon Aug 15 18:42:15 UTC 2016
Modified Files:
src/sbin/fsck_ext2fs: fsck.h setup.c
Log Message:
divorce list of features supported by fsck_ext2fs from the kernel;
while kernel might support e.g. extents, extra_isize or dir_nlink,
fsck could actually have no idea about the features
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck_ext2fs/fsck.h
cvs rdiff -u -r1.32 -r1.33 src/sbin/fsck_ext2fs/setup.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/fsck_ext2fs/fsck.h
diff -u src/sbin/fsck_ext2fs/fsck.h:1.15 src/sbin/fsck_ext2fs/fsck.h:1.16
--- src/sbin/fsck_ext2fs/fsck.h:1.15 Mon Oct 19 18:41:08 2009
+++ src/sbin/fsck_ext2fs/fsck.h Mon Aug 15 18:42:15 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.15 2009/10/19 18:41:08 bouyer Exp $ */
+/* $NetBSD: fsck.h,v 1.16 2016/08/15 18:42:15 jdolecek Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -230,6 +230,17 @@ struct ext2fs_dinode zino;
#define ALTERED 0x08
#define FOUND 0x10
+/*
+ * Kernel support for features doesn't imply fsck support
+ */
+#define EXT2F_COMPAT_SUPP_FSCK 0x00
+#define EXT2F_ROCOMPAT_SUPP_FSCK (EXT2F_ROCOMPAT_SPARSESUPER \
+ | EXT2F_ROCOMPAT_LARGEFILE \
+ | EXT2F_ROCOMPAT_HUGE_FILE \
+ )
+#define EXT2F_INCOMPAT_SUPP_FSCK (EXT2F_INCOMPAT_FTYPE \
+ )
+
struct ext2fs_dinode *ginode(ino_t);
struct inoinfo *getinoinfo(ino_t);
void getblk(struct bufarea *, daddr_t, long);
Index: src/sbin/fsck_ext2fs/setup.c
diff -u src/sbin/fsck_ext2fs/setup.c:1.32 src/sbin/fsck_ext2fs/setup.c:1.33
--- src/sbin/fsck_ext2fs/setup.c:1.32 Thu Dec 4 01:41:37 2014
+++ src/sbin/fsck_ext2fs/setup.c Mon Aug 15 18:42:15 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.32 2014/12/04 01:41:37 christos Exp $ */
+/* $NetBSD: setup.c,v 1.33 2016/08/15 18:42:15 jdolecek Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -58,7 +58,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.5 (Berkeley) 11/23/94";
#else
-__RCSID("$NetBSD: setup.c,v 1.32 2014/12/04 01:41:37 christos Exp $");
+__RCSID("$NetBSD: setup.c,v 1.33 2016/08/15 18:42:15 jdolecek Exp $");
#endif
#endif /* not lint */
@@ -377,8 +377,8 @@ readsb(int listerr)
asblk.b_un.b_fs->e2fs_features_rocompat |=
sblk.b_un.b_fs->e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGEFILE;
if (sblock.e2fs.e2fs_rev > E2FS_REV0 &&
- ((sblock.e2fs.e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP) ||
- (sblock.e2fs.e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP))) {
+ ((sblock.e2fs.e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP_FSCK) ||
+ (sblock.e2fs.e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP_FSCK))) {
if (debug) {
printf("compat 0x%08x, incompat 0x%08x, compat_ro "
"0x%08x\n",