There's just one caller left. Since qemuBuildMemoryBackendProps is too complex to be modified for now, just move the adding of 'id' and 'qom' type directly into the function. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_command.c | 6 ++++-- src/qemu/qemu_monitor.c | 15 --------------- src/qemu/qemu_monitor.h | 4 ---- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 4050e1e7af..e21cbb451e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3206,10 +3206,12 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps, rc = 0; } - if (!(*backendProps = qemuMonitorCreateObjectPropsWrap(backendType, alias, - &props))) + if (virJSONValueObjectPrependString(props, "id", alias) < 0 || + virJSONValueObjectPrependString(props, "qom-type", backendType) < 0) return -1; + *backendProps = g_steal_pointer(&props); + return rc; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 5da3213976..e0eee3ce9e 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3008,21 +3008,6 @@ qemuMonitorAddDeviceArgs(qemuMonitorPtr mon, } -virJSONValuePtr -qemuMonitorCreateObjectPropsWrap(const char *type, - const char *alias, - virJSONValuePtr *props) -{ - - if (virJSONValueObjectPrependString(*props, "id", alias) < 0 || - virJSONValueObjectPrependString(*props, "qom-type", type)) - return NULL; - - return g_steal_pointer(props); -} - - - /** * qemuMonitorCreateObjectProps: * @propsret: returns full object properties diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index a7fba393bf..e02e131e3b 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1009,10 +1009,6 @@ int qemuMonitorAddDeviceWithFd(qemuMonitorPtr mon, int qemuMonitorDelDevice(qemuMonitorPtr mon, const char *devalias); -virJSONValuePtr qemuMonitorCreateObjectPropsWrap(const char *type, - const char *alias, - virJSONValuePtr *props); - int qemuMonitorCreateObjectProps(virJSONValuePtr *propsret, const char *type, const char *alias, -- 2.28.0