This reverts commit 35b5b244da825fb41e35e4dc62e740d716214ec9.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/locking/lock_driver.h | 4 ----
src/locking/lock_driver_lockd.c | 4 +---
src/locking/lock_driver_sanlock.c | 4 +---
src/locking/lock_manager.c | 10 +++-------
4 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/src/locking/lock_driver.h b/src/locking/lock_driver.h
index ae30abda7d..7c8f744be3 100644
--- a/src/locking/lock_driver.h
+++ b/src/locking/lock_driver.h
@@ -124,7 +124,6 @@ struct _virLockManagerParam {
/**
* virLockDriverInit:
* @version: the libvirt requested plugin ABI version
- * @configFile: path to config file
* @flags: the libvirt requested plugin optional extras
*
* Allow the plugin to validate the libvirt requested
@@ -132,9 +131,6 @@ struct _virLockManagerParam {
* to block its use in versions of libvirtd which are
* too old to support key features.
*
- * The @configFile variable points to config file that the driver
- * should load. If NULL, no config file should be loaded.
- *
* NB: A plugin may be loaded multiple times, for different
* libvirt drivers (eg QEMU, LXC, UML)
*
diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 0c672b05b1..85cdcf97be 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -371,10 +371,8 @@ static int virLockManagerLockDaemonInit(unsigned int version,
driver->requireLeaseForDisks = true;
driver->autoDiskLease = true;
- if (configFile &&
- virLockManagerLockDaemonLoadConfig(configFile) < 0) {
+ if (virLockManagerLockDaemonLoadConfig(configFile) < 0)
goto error;
- }
if (driver->autoDiskLease) {
if (driver->fileLockSpaceDir &&
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 3ad0dc9bed..b10d8197c5 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -446,10 +446,8 @@ static int virLockManagerSanlockInit(unsigned int version,
goto error;
}
- if (configFile &&
- virLockManagerSanlockLoadConfig(driver, configFile) < 0) {
+ if (virLockManagerSanlockLoadConfig(driver, configFile) < 0)
goto error;
- }
if (driver->autoDiskLease && !driver->hostID) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c
index 9067f5a01a..d421b6acfc 100644
--- a/src/locking/lock_manager.c
+++ b/src/locking/lock_manager.c
@@ -104,8 +104,6 @@ static void virLockManagerLogParams(size_t nparams,
/**
* virLockManagerPluginNew:
* @name: the name of the plugin
- * @driverName: the hypervisor driver that loads the plugin
- * @configDir: path to dir where config files are stored
* @flag: optional plugin flags
*
* Attempt to load the plugin $(libdir)/libvirt/lock-driver/(a)name.so
@@ -131,13 +129,11 @@ virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
char *configFile = NULL;
VIR_DEBUG("name=%s driverName=%s configDir=%s flags=0x%x",
- name, NULLSTR(driverName), NULLSTR(configDir), flags);
+ name, driverName, configDir, flags);
- if (driverName && configDir &&
- virAsprintf(&configFile, "%s/%s-%s.conf",
- configDir, driverName, name) < 0) {
+ if (virAsprintf(&configFile, "%s/%s-%s.conf",
+ configDir, driverName, name) < 0)
return NULL;
- }
if (STREQ(name, "nop")) {
driver = &virLockDriverNop;
--
2.18.1