lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Feb 2009 18:38:53 +0100
From:	Karel Zak <kzak@...hat.com>
To:	linux-ext4@...r.kernel.org
Cc:	"Theodore Ts'o" <tytso@....edu>, Karel Zak <kzak@...hat.com>
Subject: [PATCH] tune2fs: make findfs code optional

This patch add CONFIG_BUILD_FINDFS to enable/disable findfs(8) code
in tune2fs.

Signed-off-by: Karel Zak <kzak@...hat.com>
---
 configure.in   |    2 ++
 misc/tune2fs.c |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configure.in b/configure.in
index 83ab14d..a45ad2c 100644
--- a/configure.in
+++ b/configure.in
@@ -296,10 +296,12 @@ then
 	AC_MSG_RESULT([Disabling private blkid library])
 else
 	BLKID_CMT=
+	AC_DEFINE(CONFIG_BUILD_FINDFS)
 	AC_MSG_RESULT([Enabling private blkid library])
 fi
 ,
 BLKID_CMT=
+AC_DEFINE(CONFIG_BUILD_FINDFS)
 AC_MSG_RESULT([Enabling private blkid library by default])
 )
 AC_SUBST(BLKID_CMT)
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 887a702..f1c8ab9 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -95,7 +95,9 @@ struct blk_move {
 
 static const char *please_fsck = N_("Please run e2fsck on the filesystem.\n");
 
+#ifdef CONFIG_BUILD_FINDFS
 void do_findfs(int argc, char **argv);
+#endif
 
 static void usage(void)
 {
@@ -836,6 +838,7 @@ static void parse_tune2fs_options(int argc, char **argv)
 	}
 }
 
+#ifdef CONFIG_BUILD_FINDFS
 void do_findfs(int argc, char **argv)
 {
 	char	*dev;
@@ -854,6 +857,7 @@ void do_findfs(int argc, char **argv)
 	puts(dev);
 	exit(0);
 }
+#endif
 
 static void parse_extended_opts(ext2_filsys fs, const char *opts)
 {
@@ -1492,8 +1496,10 @@ int main(int argc, char **argv)
 		program_name = *argv;
 	add_error_table(&et_ext2_error_table);
 
+#ifdef CONFIG_BUILD_FINDFS
 	if (strcmp(get_progname(argv[0]), "findfs") == 0)
 		do_findfs(argc, argv);
+#endif
 	if (strcmp(get_progname(argv[0]), "e2label") == 0)
 		parse_e2label_options(argc, argv);
 	else
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ