From: Karel Zak Date: Tue, 27 Oct 2009 11:11:37 +0000 (+0100) Subject: build-sys: add HAVE_LIBBLKID_INTERNAL X-Git-Tag: v2.17-rc1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a70e0cba214868345d8fc3ee27cca2e1f972f14;p=thirdparty%2Futil-linux.git 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 --- diff --git a/configure.ac b/configure.ac index c8140285b5..fc0b9e1b8a 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 73cede7537..1c72d07bef 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 0341dab75b..77211806d3 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 */