Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_ext2fs more informative debug output for unsupport...
details: https://anonhg.NetBSD.org/src/rev/220ffe137343
branches: trunk
changeset: 347144:220ffe137343
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Aug 15 19:13:24 2016 +0000
description:
more informative debug output for unsupported features
diffstat:
sbin/fsck_ext2fs/setup.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r 89fcc5412738 -r 220ffe137343 sbin/fsck_ext2fs/setup.c
--- a/sbin/fsck_ext2fs/setup.c Mon Aug 15 18:57:06 2016 +0000
+++ b/sbin/fsck_ext2fs/setup.c Mon Aug 15 19:13:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.34 2016/08/15 18:57:06 jdolecek Exp $ */
+/* $NetBSD: setup.c,v 1.35 2016/08/15 19:13:24 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.34 2016/08/15 18:57:06 jdolecek Exp $");
+__RCSID("$NetBSD: setup.c,v 1.35 2016/08/15 19:13:24 jdolecek Exp $");
#endif
#endif /* not lint */
@@ -78,6 +78,8 @@
#include <string.h>
#include <ctype.h>
+#include <util.h>
+
#include "fsck.h"
#include "extern.h"
#include "fsutil.h"
@@ -385,6 +387,21 @@
sblock.e2fs.e2fs_features_compat,
sblock.e2fs.e2fs_features_incompat,
sblock.e2fs.e2fs_features_rocompat);
+
+ if ((sblock.e2fs.e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP_FSCK)) {
+ char buf[512];
+
+ snprintb(buf, sizeof(buf), EXT2F_ROCOMPAT_BITS,
+ sblock.e2fs.e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP_FSCK);
+ printf("unsupported rocompat features: %s\n", buf);
+ }
+ if ((sblock.e2fs.e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP_FSCK)) {
+ char buf[512];
+
+ snprintb(buf, sizeof(buf), EXT2F_INCOMPAT_BITS,
+ sblock.e2fs.e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP_FSCK);
+ printf("unsupported incompat features: %s\n", buf);
+ }
}
badsb(listerr, "INCOMPATIBLE FEATURE BITS IN SUPER BLOCK");
return 0;
Home |
Main Index |
Thread Index |
Old Index