From: Pavel Hrdina Date: Tue, 23 Jun 2020 22:15:15 +0000 (+0200) Subject: m4: virt-sanlock: drop check for sanlock_killpath() X-Git-Tag: v6.6.0-rc1~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab7204d908d1de9dfa9749ec75839e7e70d8a38c;p=thirdparty%2Flibvirt.git m4: virt-sanlock: drop check for sanlock_killpath() Function sanlock_killpath() was introduced in 2.4 version and had modified one of the arguments from `char *` into `const char *` in version 2.7. All of this is available in all supported OSes. Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko Reviewed-by: Michal Privoznik --- diff --git a/m4/virt-sanlock.m4 b/m4/virt-sanlock.m4 index 15a9bc6035..bf8c87866e 100644 --- a/m4/virt-sanlock.m4 +++ b/m4/virt-sanlock.m4 @@ -30,13 +30,6 @@ AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[ CPPFLAGS="$CPPFLAGS $SANLOCK_CFLAGS" LIBS="$LIBS $SANLOCK_LIBS" - AC_CHECK_LIB([sanlock_client], [sanlock_killpath], - [sanlock_killpath=yes], [sanlock_killpath=no]) - if test "x$sanlock_killpath" = "xyes" ; then - AC_DEFINE_UNQUOTED([HAVE_SANLOCK_KILLPATH], 1, - [whether Sanlock supports sanlock_killpath]) - fi - dnl Ideally, we would check for sanlock_add_lockspace_timeout here too, but dnl sanlock_write_lockspace has been introduced 2 releases after dnl sanlock_add_lockspace_timeout therefore if sanlock_write_lockspace is found diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index 996db3e362..16d050fda1 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -812,7 +812,6 @@ static int virLockManagerSanlockAddResource(virLockManagerPtr lock, return 0; } -#if HAVE_SANLOCK_KILLPATH static int virLockManagerSanlockRegisterKillscript(int sock, const char *vmuri, @@ -894,18 +893,6 @@ virLockManagerSanlockRegisterKillscript(int sock, VIR_FREE(args); return ret; } -#else -static int -virLockManagerSanlockRegisterKillscript(int sock G_GNUC_UNUSED, - const char *vmuri G_GNUC_UNUSED, - const char *uuidstr G_GNUC_UNUSED, - virDomainLockFailureAction action G_GNUC_UNUSED) -{ - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("sanlock is too old to support lock failure action")); - return -1; -} -#endif static int virLockManagerSanlockAcquire(virLockManagerPtr lock, const char *state,