Re: [libvirt] [PATCH] qemu: Don't return memory device config on error in qemuBuildMemoryBackendStr
On Mon, Mar 23, 2015 at 09:41:23 -0400, John Ferlan wrote: > > > On 03/23/2015 09:23 AM, Peter Krempa wrote: > > In the last section if the function determines that the config is > > invalid when QEMU doesn't support the memory device the JSON config > > object would be returned even if it doesn't make sense. > > > > Assign the object to be returned only on success. > > --- > > src/qemu/qemu_command.c | 7 --- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > ACK Pushed; Thanks. Peter signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Don't return memory device config on error in qemuBuildMemoryBackendStr
On 03/23/2015 09:23 AM, Peter Krempa wrote: > In the last section if the function determines that the config is > invalid when QEMU doesn't support the memory device the JSON config > object would be returned even if it doesn't make sense. > > Assign the object to be returned only on success. > --- > src/qemu/qemu_command.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > ACK John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] qemu: Don't return memory device config on error in qemuBuildMemoryBackendStr
In the last section if the function determines that the config is invalid when QEMU doesn't support the memory device the JSON config object would be returned even if it doesn't make sense. Assign the object to be returned only on success. --- src/qemu/qemu_command.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 63d43d4..04e7bcc 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4750,9 +4750,6 @@ qemuBuildMemoryBackendStr(unsigned long long size, goto cleanup; } -*backendProps = props; -props = NULL; - if (!hugepage) { bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, guestNode); @@ -4767,11 +4764,15 @@ qemuBuildMemoryBackendStr(unsigned long long size, /* report back that using the new backend is not necessary to achieve * the desired configuration */ if (!userNodeset && !nodeSpecified) { +*backendProps = props; +props = NULL; ret = 1; goto cleanup; } } +*backendProps = props; +props = NULL; ret = 0; cleanup: -- 2.2.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list