From 1a70e0cba214868345d8fc3ee27cca2e1f972f14 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Oct 2009 12:11:37 +0100 Subject: [PATCH] build-sys: add HAVE_LIBBLKID_INTERNAL It's better to use one macro for all situations where we depends on in-tree (internal) libblkid. Signed-off-by: Karel Zak --- configure.ac | 3 +-- disk-utils/mkswap.c | 4 ++-- lib/fsprobe.c | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index c8140285..fc0b9e1b 100644 --- a/configure.ac +++ b/configure.ac @@ -359,8 +359,7 @@ if test "x$enable_libblkid" = xno; then else # internal library AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the header file.]) - AC_DEFINE(HAVE_BLKID_EVALUATE_TAG, 1, [Define to 1 if you have the blkid_evaluate_tag().]) - AC_DEFINE(HAVE_BLKID_PROBE_ENABLE_PARTITIONS, 1, [Define to 1 if you have the blkid_probe_enable_partitions().]) + AC_DEFINE(HAVE_LIBBLKID_INTERNAL, 1, [Define to 1 if you have the in-tree libblkid.]) fi if test "x$have_blkid" = xyes; then diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 73cede75..1c72d07b 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -62,7 +62,7 @@ # endif #endif -#ifdef HAVE_BLKID_PROBE_ENABLE_PARTITIONS +#ifdef HAVE_LIBBLKID_INTERNAL # include #endif @@ -407,7 +407,7 @@ zap_bootbits(int fd, const char *devname, int force) whole = 1; zap = 0; } else { -#ifdef HAVE_BLKID_PROBE_ENABLE_PARTITIONS +#ifdef HAVE_LIBBLKID_INTERNAL blkid_probe pr = blkid_new_probe(); if (!pr) die(_("unable to alloc new libblkid probe")); diff --git a/lib/fsprobe.c b/lib/fsprobe.c index 0341dab7..77211806 100644 --- a/lib/fsprobe.c +++ b/lib/fsprobe.c @@ -20,7 +20,7 @@ static blkid_cache blcache; -#ifdef HAVE_BLKID_EVALUATE_TAG +#ifdef HAVE_LIBBLKID_INTERNAL /* ask kernel developers why we need such ugly open() method... */ static int open_device(const char *devname) @@ -97,7 +97,7 @@ fsprobe_known_fstype(const char *fstype) return blkid_known_fstype(fstype); } -#ifdef HAVE_BLKID_EVALUATE_TAG +#ifdef HAVE_LIBBLKID_INTERNAL /* * libblkid from util-linux-ng * -- recommended @@ -178,7 +178,7 @@ fsprobe_get_devname_by_label(const char *label) return blkid_evaluate_tag("LABEL", label, &blcache); } -#else /* !HAVE_BLKID_EVALUATE_TAG */ +#else /* !HAVE_LIBBLKID_INTERNAL */ /* * Classic libblkid (from e2fsprogs) without blkid_evaluate_tag() @@ -249,4 +249,4 @@ fsprobe_get_uuid_by_devname(const char *devname) return blkid_get_tag_value(blcache, "UUID", devname); } -#endif /* !HAVE_BLKID_EVALUATE_TAG */ +#endif /* !HAVE_LIBBLKID_INTERNAL */ -- 2.39.5