Module Name:    src
Committed By:   jdolecek
Date:           Fri Aug  5 20:06:55 UTC 2016

Modified Files:
        src/sys/ufs/ext2fs: ext2fs_vfsops.c

Log Message:
add devel ifndefs for incompat/rocompat features so that it's possible
to ignore them and mount the filesystem; default is for the mount to fail


To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/sys/ufs/ext2fs/ext2fs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.196 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.197
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.196	Wed Aug  3 23:33:59 2016
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c	Fri Aug  5 20:06:55 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vfsops.c,v 1.196 2016/08/03 23:33:59 pgoyette Exp $	*/
+/*	$NetBSD: ext2fs_vfsops.c,v 1.197 2016/08/05 20:06:55 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.196 2016/08/03 23:33:59 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.197 2016/08/05 20:06:55 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -1238,14 +1238,18 @@ ext2fs_sbfill(struct m_ext2fs *m_fs, int
 		if (u32) {
 			snprintb(buf, sizeof(buf), EXT2F_INCOMPAT_BITS, u32);
 			printf("ext2fs: unsupported incompat features: %s\n", buf);
+#ifndef EXT2_IGNORE_INCOMPAT_FEATURES
 			return EINVAL;
+#endif
 		}
 		u32 = fs->e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP;
 		if (!ronly && u32) {
 			snprintb(buf, sizeof(buf), EXT2F_ROCOMPAT_BITS, u32);
 			printf("ext2fs: unsupported ro-incompat features: %s\n",
 			    buf);
+#ifndef EXT2_IGNORE_ROCOMPAT_FEATURES
 			return EROFS;
+#endif
 		}
 		if (fs->e2fs_inode_size == 0 || !powerof2(fs->e2fs_inode_size) || fs->e2fs_inode_size > m_fs->e2fs_bsize) {
 			printf("ext2fs: bad inode size\n");

Reply via email to