]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
m4: virt-sanlock: drop check for sanlock_killpath()
authorPavel Hrdina <phrdina@redhat.com>
Tue, 23 Jun 2020 22:15:15 +0000 (00:15 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 10 Jul 2020 07:40:22 +0000 (09:40 +0200)
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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
m4/virt-sanlock.m4
src/locking/lock_driver_sanlock.c

index 15a9bc6035f9d601125f20e80dacc9e64b528e09..bf8c87866e50f41e21767d6692760af0367f454a 100644 (file)
@@ -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
index 996db3e362001de0b1d8974159fee8fcd7b3ec36..16d050fda1f4245e8b286f3fe75e6e2388704868 100644 (file)
@@ -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,