From: Karel Zak <kzak@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: "Theodore Ts'o" <tytso@mit.edu>, Karel Zak <kzak@redhat.com>
Subject: [PATCH] tune2fs: make findfs code optional
Date: Mon, 23 Feb 2009 18:38:53 +0100 [thread overview]
Message-ID: <1235410733-4193-3-git-send-email-kzak@redhat.com> (raw)
In-Reply-To: <1235410733-4193-1-git-send-email-kzak@redhat.com>
This patch add CONFIG_BUILD_FINDFS to enable/disable findfs(8) code
in tune2fs.
Signed-off-by: Karel Zak <kzak@redhat.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
next prev parent reply other threads:[~2009-02-23 17:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 17:38 uti-linux-ng libblkid Karel Zak
2009-02-23 17:38 ` [PATCH] blkid: add --disable-libblkid to build with external libblkid Karel Zak
2009-02-24 8:44 ` [PATCH] blkid: add --disable-libblkid (v2) Karel Zak
2009-03-24 12:11 ` Scott James Remnant
2009-04-16 10:22 ` Karel Zak
2009-04-17 13:36 ` Kay Sievers
2009-04-17 13:48 ` Scott James Remnant
2009-04-22 13:33 ` Theodore Tso
2009-04-22 13:42 ` Scott James Remnant
2009-04-22 13:49 ` Theodore Tso
2009-04-22 14:07 ` Scott James Remnant
2009-04-29 17:22 ` Scott James Remnant
2009-04-29 20:54 ` Theodore Tso
2009-05-05 11:30 ` Scott James Remnant
2009-04-27 9:21 ` Karel Zak
2009-04-28 20:36 ` Karel Zak
2009-04-29 13:59 ` Scott James Remnant
2009-04-29 17:17 ` Theodore Tso
2009-04-29 20:23 ` Theodore Tso
2009-04-30 8:28 ` Karel Zak
2009-02-23 17:38 ` Karel Zak [this message]
2009-03-09 1:08 ` uti-linux-ng libblkid Theodore Tso
2009-03-09 10:42 ` Karel Zak
2009-03-09 11:45 ` Karel Zak
2009-03-18 19:28 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1235410733-4193-3-git-send-email-kzak@redhat.com \
--to=kzak@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).