Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ext2fs add devel ifndefs for incompat/rocompat featu...
details: https://anonhg.NetBSD.org/src/rev/6214da522205
branches: trunk
changeset: 346890:6214da522205
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Aug 05 20:06:55 2016 +0000
description:
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
diffstat:
sys/ufs/ext2fs/ext2fs_vfsops.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 482cb857f2eb -r 6214da522205 sys/ufs/ext2fs/ext2fs_vfsops.c
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c Fri Aug 05 17:12:13 2016 +0000
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c Fri Aug 05 20:06:55 2016 +0000
@@ -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 @@
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");
Home |
Main Index |
Thread Index |
Old Index