diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6496fe4719e7b8b8a034ff2713ab1ad447fbcada..09f90320e83ae44ae3bcf1cf88859d9ddc8dba27 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 b2a484d2ff06fb51741d74b1ef8be6ed5554e59d..a585a54ed808ca01f80e9eae8c528eebd038fb08 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 43f1d2f8167131096e12db8f9d1160113e50dfcb..77ad47cb7467a3ee4e1097d513259a4ee934bc29 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 c28db1a52b8b82dceeb58845fa2f81c08f42dcfc..77a26d4a8a6075c820ff97496611c9a888c259d2 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);