[libvirt PATCH 12/31] m4: virt-sanlock: drop check for sanlock_killpath()

Pavel Hrdina phrdina at redhat.com
Thu Jul 2 12:25:10 UTC 2020


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 <phrdina at redhat.com>
---
 m4/virt-sanlock.m4                |  7 -------
 src/locking/lock_driver_sanlock.c | 13 -------------
 2 files changed, 20 deletions(-)

diff --git a/m4/virt-sanlock.m4 b/m4/virt-sanlock.m4
index 15a9bc6035f..bf8c87866e5 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 cc8266a2b35..2f1eded1247 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,
-- 
2.26.2




More information about the libvir-list mailing list