if test "x$with_sanlock" = "xyes" ; then
AC_DEFINE_UNQUOTED([HAVE_SANLOCK], 1,
[whether Sanlock plugin for lock management is available])
+
+ 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
fi
fi
AM_CONDITIONAL([HAVE_SANLOCK], [test "x$with_sanlock" = "xyes"])
return 0;
}
+#if HAVE_SANLOCK_KILLPATH
static int
virLockManagerSanlockRegisterKillscript(int sock,
const char *vmuri,
VIR_FREE(args);
return ret;
}
+#else
+static int
+virLockManagerSanlockRegisterKillscript(int sock ATTRIBUTE_UNUSED,
+ const char *vmuri ATTRIBUTE_UNUSED,
+ const char *uuidstr ATTRIBUTE_UNUSED,
+ virDomainLockFailureAction action ATTRIBUTE_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,