The function adds the object of a certain type. Change the name so that
we make room for the generic function.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hotplug.c | 50 ++++++++++++++++++++++++-------------------------
src/qemu/qemu_monitor.c | 10 +++++-----
src/qemu/qemu_monitor.h | 8 ++++----
4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 3aa694de12..922603a7a3 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5819,7 +5819,7 @@ qemuDomainHotplugAddIOThread(virQEMUDriverPtr driver,
qemuDomainObjEnterMonitor(driver, vm);
- rc = qemuMonitorAddObject(priv->mon, "iothread", alias, NULL);
+ rc = qemuMonitorAddObjectType(priv->mon, "iothread", alias, NULL);
exp_niothreads++;
if (rc < 0)
goto exit_monitor;
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 7ce427be0d..10735622d1 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -487,28 +487,28 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
qemuDomainObjEnterMonitor(driver, vm);
if (secobjProps) {
- rv = qemuMonitorAddObject(priv->mon, "secret",
secinfo->s.aes.alias,
- secobjProps);
- secobjProps = NULL; /* qemuMonitorAddObject consumes */
+ rv = qemuMonitorAddObjectType(priv->mon, "secret",
secinfo->s.aes.alias,
+ secobjProps);
+ secobjProps = NULL; /* qemuMonitorAddObjectType consumes */
if (rv < 0)
goto exit_monitor;
secobjAdded = true;
}
if (encobjProps) {
- rv = qemuMonitorAddObject(priv->mon, "secret",
encinfo->s.aes.alias,
- encobjProps);
- encobjProps = NULL; /* qemuMonitorAddObject consumes */
+ rv = qemuMonitorAddObjectType(priv->mon, "secret",
encinfo->s.aes.alias,
+ encobjProps);
+ encobjProps = NULL; /* qemuMonitorAddObjectType consumes */
if (rv < 0)
goto exit_monitor;
encobjAdded = true;
}
if (prmgrProps) {
- rv = qemuMonitorAddObject(priv->mon, "pr-manager-helper",
- disk->src->pr->mgralias,
- prmgrProps);
- prmgrProps = NULL; /* qemuMonitorAddObject consumes */
+ rv = qemuMonitorAddObjectType(priv->mon, "pr-manager-helper",
+ disk->src->pr->mgralias,
+ prmgrProps);
+ prmgrProps = NULL; /* qemuMonitorAddObjectType consumes */
if (rv < 0)
goto exit_monitor;
prmgrAdded = true;
@@ -1465,17 +1465,17 @@ qemuDomainAddTLSObjects(virQEMUDriverPtr driver,
return -1;
if (secAlias) {
- rc = qemuMonitorAddObject(priv->mon, "secret",
- secAlias, *secProps);
- *secProps = NULL; /* qemuMonitorAddObject consumes */
+ rc = qemuMonitorAddObjectType(priv->mon, "secret",
+ secAlias, *secProps);
+ *secProps = NULL; /* qemuMonitorAddObjectType consumes */
if (rc < 0)
goto error;
}
if (tlsAlias) {
- rc = qemuMonitorAddObject(priv->mon, "tls-creds-x509",
- tlsAlias, *tlsProps);
- *tlsProps = NULL; /* qemuMonitorAddObject consumes */
+ rc = qemuMonitorAddObjectType(priv->mon, "tls-creds-x509",
+ tlsAlias, *tlsProps);
+ *tlsProps = NULL; /* qemuMonitorAddObjectType consumes */
if (rc < 0)
goto error;
}
@@ -2037,8 +2037,8 @@ qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
goto exit_monitor;
chardevAdded = true;
- rv = qemuMonitorAddObject(priv->mon, type, objAlias, props);
- props = NULL; /* qemuMonitorAddObject consumes */
+ rv = qemuMonitorAddObjectType(priv->mon, type, objAlias, props);
+ props = NULL; /* qemuMonitorAddObjectType consumes */
if (rv < 0)
goto exit_monitor;
objAdded = true;
@@ -2168,8 +2168,8 @@ qemuDomainAttachMemory(virQEMUDriverPtr driver,
goto removedef;
qemuDomainObjEnterMonitor(driver, vm);
- rv = qemuMonitorAddObject(priv->mon, backendType, objalias, props);
- props = NULL; /* qemuMonitorAddObject consumes */
+ rv = qemuMonitorAddObjectType(priv->mon, backendType, objalias, props);
+ props = NULL; /* qemuMonitorAddObjectType consumes */
if (rv < 0)
goto exit_monitor;
objAdded = true;
@@ -2407,9 +2407,9 @@ qemuDomainAttachHostSCSIDevice(virQEMUDriverPtr driver,
qemuDomainObjEnterMonitor(driver, vm);
if (secobjProps) {
- rv = qemuMonitorAddObject(priv->mon, "secret",
secinfo->s.aes.alias,
- secobjProps);
- secobjProps = NULL; /* qemuMonitorAddObject consumes */
+ rv = qemuMonitorAddObjectType(priv->mon, "secret",
secinfo->s.aes.alias,
+ secobjProps);
+ secobjProps = NULL; /* qemuMonitorAddObjectType consumes */
if (rv < 0)
goto exit_monitor;
secobjAdded = true;
@@ -2780,8 +2780,8 @@ qemuDomainAttachShmemDevice(virQEMUDriverPtr driver,
&shmem->server.chr) < 0)
goto exit_monitor;
} else {
- if (qemuMonitorAddObject(priv->mon, "memory-backend-file",
- memAlias, props) < 0) {
+ if (qemuMonitorAddObjectType(priv->mon, "memory-backend-file",
+ memAlias, props) < 0) {
props = NULL;
goto exit_monitor;
}
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 43f1d2f816..77ad47cb74 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2992,7 +2992,7 @@ qemuMonitorAddDeviceArgs(qemuMonitorPtr mon,
/**
- * qemuMonitorAddObject:
+ * qemuMonitorAddObjectType:
* @mon: Pointer to monitor object
* @type: Type name of object to add
* @objalias: Alias of the new object
@@ -3002,10 +3002,10 @@ qemuMonitorAddDeviceArgs(qemuMonitorPtr mon,
* Returns 0 on success -1 on error.
*/
int
-qemuMonitorAddObject(qemuMonitorPtr mon,
- const char *type,
- const char *objalias,
- virJSONValuePtr props)
+qemuMonitorAddObjectType(qemuMonitorPtr mon,
+ const char *type,
+ const char *objalias,
+ virJSONValuePtr props)
{
VIR_DEBUG("type=%s objalias=%s props=%p", type, objalias, props);
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index c28db1a52b..77a26d4a8a 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -797,10 +797,10 @@ int qemuMonitorAddDeviceWithFd(qemuMonitorPtr mon,
int qemuMonitorDelDevice(qemuMonitorPtr mon,
const char *devalias);
-int qemuMonitorAddObject(qemuMonitorPtr mon,
- const char *type,
- const char *objalias,
- virJSONValuePtr props);
+int qemuMonitorAddObjectType(qemuMonitorPtr mon,
+ const char *type,
+ const char *objalias,
+ virJSONValuePtr props);
int qemuMonitorDelObject(qemuMonitorPtr mon,
const char *objalias);
--
2.16.2