diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2015-06-23 15:20:51 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2015-06-24 11:13:38 +0200 |
commit | 20e336f21c242e7a98d11d9dc03941512c0ab69a (patch) | |
tree | d782d11d954f1d79793583ae15d36def50a057ff | |
parent | 6575122c63de3d400ee46ea0f400ab44b8520978 (diff) | |
download | lvm2-20e336f21c242e7a98d11d9dc03941512c0ab69a.tar.gz |
configure: add DEFAULT_USE_BLKID_WIPING
If blkid wiping is possible, than set use_blkid_wiping=1 and
use_blkid_wiping=0 otherwise for its default value. If blkid wiping
is disabled during configure and use_blkid_wiping=1 is set by chance,
it's simply ignored - this patch is just a cleanup that makes it more
obvious for the user (we use similar logic for use_lvmetad and
use_lvmpolld settings).
-rwxr-xr-x | configure | 12 | ||||
-rw-r--r-- | configure.in | 9 | ||||
-rw-r--r-- | lib/config/config_settings.h | 2 | ||||
-rw-r--r-- | lib/misc/configure.h.in | 3 |
4 files changed, 23 insertions, 3 deletions
@@ -695,6 +695,7 @@ DL_LIBS DEVMAPPER DEFAULT_USE_LVMPOLLD DEFAULT_USE_LVMETAD +DEFAULT_USE_BLKID_WIPING DEFAULT_SYS_DIR DEFAULT_SPARSE_SEGTYPE DEFAULT_RUN_DIR @@ -724,7 +725,6 @@ BUILD_LVMPOLLD BUILD_LVMETAD BUILD_DMEVENTD BUILD_CMIRRORD -BLKID_WIPING BLKID_PC APPLIB MODPROBE_CMD @@ -11052,12 +11052,22 @@ $as_echo "yes" >&6; } fi if test "$BLKID_WIPING" = yes; then BLKID_PC="blkid" + DEFAULT_USE_BLKID_WIPING=1 $as_echo "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h + else + DEFAULT_USE_BLKID_WIPING=1 fi +else + DEFAULT_USE_BLKID_WIPING=0 fi +cat >>confdefs.h <<_ACEOF +#define DEFAULT_USE_BLKID_WIPING $DEFAULT_USE_BLKID_WIPING +_ACEOF + + ################################################################################ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use udev-systemd protocol for jobs in background" >&5 $as_echo_n "checking whether to use udev-systemd protocol for jobs in background... " >&6; } diff --git a/configure.in b/configure.in index 86ab98a5e..d330bd206 100644 --- a/configure.in +++ b/configure.in @@ -1152,9 +1152,16 @@ if test "$BLKID_WIPING" != no; then fi]) if test "$BLKID_WIPING" = yes; then BLKID_PC="blkid" + DEFAULT_USE_BLKID_WIPING=1 AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.]) + else + DEFAULT_USE_BLKID_WIPING=1 fi +else + DEFAULT_USE_BLKID_WIPING=0 fi +AC_DEFINE_UNQUOTED(DEFAULT_USE_BLKID_WIPING, [$DEFAULT_USE_BLKID_WIPING], + [Use blkid wiping by default.]) ################################################################################ dnl -- Enable udev-systemd protocol to instantiate a service for background jobs @@ -1742,7 +1749,6 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'` AC_SUBST(APPLIB) AC_SUBST(AWK) AC_SUBST(BLKID_PC) -AC_SUBST(BLKID_WIPING) AC_SUBST(BUILD_CMIRRORD) AC_SUBST(BUILD_DMEVENTD) AC_SUBST(BUILD_LVMETAD) @@ -1783,6 +1789,7 @@ AC_SUBST(DEFAULT_RAID10_SEGTYPE) AC_SUBST(DEFAULT_RUN_DIR) AC_SUBST(DEFAULT_SPARSE_SEGTYPE) AC_SUBST(DEFAULT_SYS_DIR) +AC_SUBST(DEFAULT_USE_BLKID_WIPING) AC_SUBST(DEFAULT_USE_LVMETAD) AC_SUBST(DEFAULT_USE_LVMPOLLD) AC_SUBST(DEVMAPPER) diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h index 461baccb9..092e86d89 100644 --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h @@ -423,7 +423,7 @@ cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0, "the same disks. This setting can be used to disable the changes\n" "and revert to the previous algorithm.\n") -cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL, 0, NULL, +cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), "@DEFAULT_USE_BLKID_WIPING@", 0, NULL, "Use blkid to detect existing signatures on new PVs and LVs.\n" "The blkid library can detect more signatures than the\n" "native LVM detection code, but may take longer.\n" diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in index 3af8ec0f4..9ec997fa9 100644 --- a/lib/misc/configure.h.in +++ b/lib/misc/configure.h.in @@ -95,6 +95,9 @@ /* Path to LVM system directory. */ #undef DEFAULT_SYS_DIR +/* Use blkid wiping by default. */ +#undef DEFAULT_USE_BLKID_WIPING + /* Use lvmetad by default. */ #undef DEFAULT_USE_LVMETAD |