mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
conf: drop virCapsPtr param from domain obj list APIs
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
78d8228eec
commit
1cd2b2d545
@ -1249,7 +1249,6 @@ bhyveStateInitialize(bool privileged,
|
||||
if (virDomainObjListLoadAllConfigs(bhyve_driver->domains,
|
||||
BHYVE_STATE_DIR,
|
||||
NULL, true,
|
||||
bhyve_driver->caps,
|
||||
bhyve_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto cleanup;
|
||||
@ -1257,7 +1256,6 @@ bhyveStateInitialize(bool privileged,
|
||||
if (virDomainObjListLoadAllConfigs(bhyve_driver->domains,
|
||||
BHYVE_CONFIG_DIR,
|
||||
BHYVE_AUTOSTART_DIR, false,
|
||||
bhyve_driver->caps,
|
||||
bhyve_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto cleanup;
|
||||
|
@ -483,7 +483,6 @@ virDomainObjListRename(virDomainObjListPtr doms,
|
||||
|
||||
static virDomainObjPtr
|
||||
virDomainObjListLoadConfig(virDomainObjListPtr doms,
|
||||
virCapsPtr caps G_GNUC_UNUSED,
|
||||
virDomainXMLOptionPtr xmlopt,
|
||||
const char *configDir,
|
||||
const char *autostartDir,
|
||||
@ -536,7 +535,6 @@ static virDomainObjPtr
|
||||
virDomainObjListLoadStatus(virDomainObjListPtr doms,
|
||||
const char *statusDir,
|
||||
const char *name,
|
||||
virCapsPtr caps G_GNUC_UNUSED,
|
||||
virDomainXMLOptionPtr xmlopt,
|
||||
virDomainLoadConfigNotify notify,
|
||||
void *opaque)
|
||||
@ -586,7 +584,6 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||
const char *configDir,
|
||||
const char *autostartDir,
|
||||
bool liveStatus,
|
||||
virCapsPtr caps,
|
||||
virDomainXMLOptionPtr xmlopt,
|
||||
virDomainLoadConfigNotify notify,
|
||||
void *opaque)
|
||||
@ -616,13 +613,11 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||
dom = virDomainObjListLoadStatus(doms,
|
||||
configDir,
|
||||
entry->d_name,
|
||||
caps,
|
||||
xmlopt,
|
||||
notify,
|
||||
opaque);
|
||||
else
|
||||
dom = virDomainObjListLoadConfig(doms,
|
||||
caps,
|
||||
xmlopt,
|
||||
configDir,
|
||||
autostartDir,
|
||||
|
@ -66,7 +66,6 @@ int virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||
const char *configDir,
|
||||
const char *autostartDir,
|
||||
bool liveStatus,
|
||||
virCapsPtr caps,
|
||||
virDomainXMLOptionPtr xmlopt,
|
||||
virDomainLoadConfigNotify notify,
|
||||
void *opaque);
|
||||
|
@ -781,7 +781,6 @@ libxlStateInitialize(bool privileged,
|
||||
cfg->stateDir,
|
||||
cfg->autostartDir,
|
||||
true,
|
||||
cfg->caps,
|
||||
libxl_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto error;
|
||||
@ -793,7 +792,6 @@ libxlStateInitialize(bool privileged,
|
||||
cfg->configDir,
|
||||
cfg->autostartDir,
|
||||
false,
|
||||
cfg->caps,
|
||||
libxl_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto error;
|
||||
@ -833,7 +831,6 @@ libxlStateReload(void)
|
||||
cfg->configDir,
|
||||
cfg->autostartDir,
|
||||
true,
|
||||
cfg->caps,
|
||||
libxl_driver->xmlopt,
|
||||
NULL, libxl_driver);
|
||||
|
||||
|
@ -1529,7 +1529,6 @@ static int lxcStateInitialize(bool privileged,
|
||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virCapsPtr caps = NULL;
|
||||
virLXCDriverConfigPtr cfg = NULL;
|
||||
bool autostart = true;
|
||||
|
||||
@ -1581,9 +1580,6 @@ static int lxcStateInitialize(bool privileged,
|
||||
if (!(lxc_driver->hostdevMgr = virHostdevManagerGetDefault()))
|
||||
goto cleanup;
|
||||
|
||||
if (!(caps = virLXCDriverGetCapabilities(lxc_driver, true)))
|
||||
goto cleanup;
|
||||
|
||||
if (!(lxc_driver->xmlopt = lxcDomainXMLConfInit(lxc_driver)))
|
||||
goto cleanup;
|
||||
|
||||
@ -1605,7 +1601,6 @@ static int lxcStateInitialize(bool privileged,
|
||||
if (virDomainObjListLoadAllConfigs(lxc_driver->domains,
|
||||
cfg->stateDir,
|
||||
NULL, true,
|
||||
caps,
|
||||
lxc_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto cleanup;
|
||||
@ -1616,7 +1611,6 @@ static int lxcStateInitialize(bool privileged,
|
||||
if (virDomainObjListLoadAllConfigs(lxc_driver->domains,
|
||||
cfg->configDir,
|
||||
cfg->autostartDir, false,
|
||||
caps,
|
||||
lxc_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto cleanup;
|
||||
@ -1627,11 +1621,9 @@ static int lxcStateInitialize(bool privileged,
|
||||
if (autostart)
|
||||
virLXCProcessAutostartAll(lxc_driver);
|
||||
|
||||
virObjectUnref(caps);
|
||||
return VIR_DRV_STATE_INIT_COMPLETE;
|
||||
|
||||
cleanup:
|
||||
virObjectUnref(caps);
|
||||
lxcStateCleanup();
|
||||
return VIR_DRV_STATE_INIT_ERROR;
|
||||
}
|
||||
@ -1659,23 +1651,17 @@ static int
|
||||
lxcStateReload(void)
|
||||
{
|
||||
virLXCDriverConfigPtr cfg = NULL;
|
||||
virCapsPtr caps = NULL;
|
||||
|
||||
if (!lxc_driver)
|
||||
return 0;
|
||||
|
||||
if (!(caps = virLXCDriverGetCapabilities(lxc_driver, false)))
|
||||
return -1;
|
||||
|
||||
cfg = virLXCDriverGetConfig(lxc_driver);
|
||||
|
||||
virDomainObjListLoadAllConfigs(lxc_driver->domains,
|
||||
cfg->configDir,
|
||||
cfg->autostartDir, false,
|
||||
caps,
|
||||
lxc_driver->xmlopt,
|
||||
lxcNotifyLoadDomain, lxc_driver);
|
||||
virObjectUnref(caps);
|
||||
virObjectUnref(cfg);
|
||||
return 0;
|
||||
}
|
||||
|
@ -972,7 +972,6 @@ qemuStateInitialize(bool privileged,
|
||||
if (virDomainObjListLoadAllConfigs(qemu_driver->domains,
|
||||
cfg->stateDir,
|
||||
NULL, true,
|
||||
qemu_driver->caps,
|
||||
qemu_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto error;
|
||||
@ -994,7 +993,6 @@ qemuStateInitialize(bool privileged,
|
||||
if (virDomainObjListLoadAllConfigs(qemu_driver->domains,
|
||||
cfg->configDir,
|
||||
cfg->autostartDir, false,
|
||||
qemu_driver->caps,
|
||||
qemu_driver->xmlopt,
|
||||
NULL, NULL) < 0)
|
||||
goto error;
|
||||
@ -1059,19 +1057,15 @@ static int
|
||||
qemuStateReload(void)
|
||||
{
|
||||
g_autoptr(virQEMUDriverConfig) cfg = NULL;
|
||||
g_autoptr(virCaps) caps = NULL;
|
||||
|
||||
if (!qemu_driver)
|
||||
return 0;
|
||||
|
||||
if (!(caps = virQEMUDriverGetCapabilities(qemu_driver, false)))
|
||||
return 0;
|
||||
|
||||
cfg = virQEMUDriverGetConfig(qemu_driver);
|
||||
virDomainObjListLoadAllConfigs(qemu_driver->domains,
|
||||
cfg->configDir,
|
||||
cfg->autostartDir, false,
|
||||
caps, qemu_driver->xmlopt,
|
||||
qemu_driver->xmlopt,
|
||||
qemuNotifyLoadDomain, qemu_driver);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user