[libvirt] [PATCH] qemu: add virQEMUBuildBufferEscapeComma in qemu_command.c
by Sukrit Bhatnagar
This patch adds virQEMUBuildBufferEscapeComma wherever applicable in src/qemu/qemu_command.c
Based on: https://wiki.libvirt.org/page/BiteSizedTasks#qemu:_Use_comma_escaping_for...
Signed-off-by: Sukrit Bhatnagar <skrtbhtngr(a)gmail.com>
---
This patch is submitted towards my proposal for GSoC'18.
Changes made:
- info->romfile in qemuBuildRomStr
- disk->vendor, disk->product in qemuBuildDriveDevStr
- fs->src->path in qemuBuildFSStr
- fs->dst in qemuBuildFSDevStr
- connect= in qemuBuildHostNetStr
- fileval handling in qemuBuildChrChardevStr
- TYPE_DEV, TYPE_PIPE handling in qemuBuildChrChardevStr
- cfg->vncTLSx509certdir in qemuBuildGraphicsVNCCommandLine
- cfg->spiceTLSx509certdir in qemuBuildGraphicsSPICECommandLine
- loader->path, loader->nvram usage qemuBuildDomainLoaderCommandLine
Places where no changes were made:
- src->hosts->socket in qemuBuildNetworkDriveURI uses virAsprintf not virBufferAsprintf; src->path, src->configFile are not used
- qemuBuildChrArgStr function does not exist
- not applicable on data.nix.path in qemuBuildVhostuserCommandLine
- converting places that use strchr in qemuBuildSmartcardCommandLine to use virBufferEscape
I have run `make check VIR_TEST_EXPENSIVE=1`, `make syntax-check` and `make -C tests valgrind`.
Some tests fail on my system, even for an unmodified clone of the repo.
But, all the tests which were passed by the unmodified clone were passed after I made these changes.
As always, your feedback is welcome!
src/qemu/qemu_command.c | 73 +++++++++++++++++++++++++++++--------------------
1 file changed, 44 insertions(+), 29 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fa0aa5d5c..06f4f72fc 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -474,8 +474,10 @@ qemuBuildRomStr(virBufferPtr buf,
default:
break;
}
- if (info->romfile)
- virBufferAsprintf(buf, ",romfile=%s", info->romfile);
+ if (info->romfile) {
+ virBufferAddLit(buf, ",romfile=");
+ virQEMUBuildBufferEscapeComma(buf, info->romfile);
+ }
}
return 0;
}
@@ -2177,11 +2179,15 @@ qemuBuildDriveDevStr(const virDomainDef *def,
virBufferAsprintf(&opt, ",wwn=0x%s", disk->wwn);
}
- if (disk->vendor)
- virBufferAsprintf(&opt, ",vendor=%s", disk->vendor);
+ if (disk->vendor) {
+ virBufferAddLit(&opt, ",vendor=");
+ virQEMUBuildBufferEscapeComma(&opt, disk->vendor);
+ }
- if (disk->product)
- virBufferAsprintf(&opt, ",product=%s", disk->product);
+ if (disk->product) {
+ virBufferAddLit(&opt, ",product=");
+ virQEMUBuildBufferEscapeComma(&opt, disk->product);
+ }
if (disk->bus == VIR_DOMAIN_DISK_BUS_USB) {
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_REMOVABLE)) {
@@ -2418,7 +2424,8 @@ qemuBuildFSStr(virDomainFSDefPtr fs,
}
virBufferAsprintf(&opt, ",id=%s%s", QEMU_FSDEV_HOST_PREFIX, fs->info.alias);
- virBufferAsprintf(&opt, ",path=%s", fs->src->path);
+ virBufferAddLit(&opt, ",path=");
+ virQEMUBuildBufferEscapeComma(&opt, fs->src->path);
if (fs->readonly) {
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_FSDEV_READONLY)) {
@@ -2463,7 +2470,8 @@ qemuBuildFSDevStr(const virDomainDef *def,
virBufferAsprintf(&opt, ",id=%s", fs->info.alias);
virBufferAsprintf(&opt, ",fsdev=%s%s",
QEMU_FSDEV_HOST_PREFIX, fs->info.alias);
- virBufferAsprintf(&opt, ",mount_tag=%s", fs->dst);
+ virBufferAddLit(&opt, ",mount_tag=");
+ virQEMUBuildBufferEscapeComma(&opt, fs->dst);
if (qemuBuildVirtioOptionsStr(&opt, fs->virtio, qemuCaps) < 0)
goto error;
@@ -3603,10 +3611,9 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
break;
case VIR_DOMAIN_NET_TYPE_CLIENT:
- virBufferAsprintf(&buf, "socket%cconnect=%s:%d,",
- type_sep,
- net->data.socket.address,
- net->data.socket.port);
+ virBufferAsprintf(&buf, "socket%cconnect=", type_sep);
+ virQEMUBuildBufferEscapeComma(&buf, net->data.socket.address);
+ virBufferAsprintf(&buf, ":%d,", net->data.socket.port);
break;
case VIR_DOMAIN_NET_TYPE_SERVER:
@@ -4858,7 +4865,8 @@ qemuBuildChrChardevFileStr(virLogManagerPtr logManager,
virBufferAsprintf(buf, ",%s=%s,%s=on", filearg, fdpath, appendarg);
VIR_FREE(fdpath);
} else {
- virBufferAsprintf(buf, ",%s=%s", filearg, fileval);
+ virBufferAsprintf(buf, ",%s=", filearg);
+ virQEMUBuildBufferEscapeComma(buf, fileval);
if (appendval != VIR_TRISTATE_SWITCH_ABSENT) {
virBufferAsprintf(buf, ",%s=%s", appendarg,
virTristateSwitchTypeToString(appendval));
@@ -4916,9 +4924,10 @@ qemuBuildChrChardevStr(virLogManagerPtr logManager,
break;
case VIR_DOMAIN_CHR_TYPE_DEV:
- virBufferAsprintf(&buf, "%s,id=%s,path=%s",
+ virBufferAsprintf(&buf, "%s,id=%s,path=",
STRPREFIX(alias, "parallel") ? "parport" : "tty",
- charAlias, dev->data.file.path);
+ charAlias);
+ virQEMUBuildBufferEscapeComma(&buf, dev->data.file.path);
break;
case VIR_DOMAIN_CHR_TYPE_FILE:
@@ -4938,8 +4947,8 @@ qemuBuildChrChardevStr(virLogManagerPtr logManager,
break;
case VIR_DOMAIN_CHR_TYPE_PIPE:
- virBufferAsprintf(&buf, "pipe,id=%s,path=%s", charAlias,
- dev->data.file.path);
+ virBufferAsprintf(&buf, "pipe,id=%s,path=", charAlias);
+ virQEMUBuildBufferEscapeComma(&buf, dev->data.file.path);
break;
case VIR_DOMAIN_CHR_TYPE_STDIO:
@@ -7829,10 +7838,13 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
if (cfg->vncTLS) {
virBufferAddLit(&opt, ",tls");
- if (cfg->vncTLSx509verify)
- virBufferAsprintf(&opt, ",x509verify=%s", cfg->vncTLSx509certdir);
- else
- virBufferAsprintf(&opt, ",x509=%s", cfg->vncTLSx509certdir);
+ if (cfg->vncTLSx509verify) {
+ virBufferAddLit(&opt, ",x509verify=");
+ virQEMUBuildBufferEscapeComma(&opt, cfg->vncTLSx509certdir);
+ } else {
+ virBufferAddLit(&opt, ",x509=");
+ virQEMUBuildBufferEscapeComma(&opt, cfg->vncTLSx509certdir);
+ }
}
if (cfg->vncSASL) {
@@ -7977,8 +7989,11 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
!cfg->spicePassword)
virBufferAddLit(&opt, "disable-ticketing,");
- if (hasSecure)
- virBufferAsprintf(&opt, "x509-dir=%s,", cfg->spiceTLSx509certdir);
+ if (hasSecure) {
+ virBufferAddLit(&opt, "x509-dir=");
+ virQEMUBuildBufferEscapeComma(&opt, cfg->spiceTLSx509certdir);
+ virBufferAddLit(&opt, ",");
+ }
switch (graphics->data.spice.defaultMode) {
case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
@@ -9463,9 +9478,9 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
NULL);
}
- virBufferAsprintf(&buf,
- "file=%s,if=pflash,format=raw,unit=%d",
- loader->path, unit);
+ virBufferAddLit(&buf, "file=");
+ virQEMUBuildBufferEscapeComma(&buf, loader->path);
+ virBufferAsprintf(&buf, ",if=pflash,format=raw,unit=%d", unit);
unit++;
if (loader->readonly) {
@@ -9478,9 +9493,9 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
if (loader->nvram) {
virBufferFreeAndReset(&buf);
- virBufferAsprintf(&buf,
- "file=%s,if=pflash,format=raw,unit=%d",
- loader->nvram, unit);
+ virBufferAddLit(&buf, "file=");
+ virQEMUBuildBufferEscapeComma(&buf, loader->nvram);
+ virBufferAsprintf(&buf, ",if=pflash,format=raw,unit=%d", unit);
virCommandAddArg(cmd, "-drive");
virCommandAddArgBuffer(cmd, &buf);
--
2.16.2
6 years, 9 months
[libvirt] [PATCH 00/20] Rework/rename virDomainObjListFindBy{UUID|ID}Ref
by John Ferlan
First, don't be scared off by 20 patches... They're not that difficult.
Second, don't be scared off by the all the various code touched.
Third, look at all the lines of code being removed! That's unlike
my normal patch series!
This is really the end game of what I started last year trying
to make object access code to be "more common". The last and worse
is/was the domain object code which really has a mish-mash of
usage models and is (to say the least) confusing depending on
the algorithm chosen (ByRef or not).
This series focuses on the various virDomainObjListFindBy* APIs
to do common things *and* allows the callers to use the common
virDomainObjEndAPI when done with the object rather than needing
to know whether they should virObjectUnlock and/or virObjectUnref.
There were one consumer (libxl) that leaked domain objs because
there was no Unref after a Ref on many API's. Additionally, there
was a possibility of a deadlock because of a missed Unlock.
This reduces a lot of code and reduces the number of virObjectUnlock
consumers.
Now *obviously* I don't have all these domain types available, but
since the goal was to remove the FindBy*Ref APIs, I had to touch
much more than I really want to. Of course only a couple are really
active anyway and I'm hoping they'll take a peek at their modules
(e.g. libxl, vz, and bhyve in particular).
Once/if this can get accomplished, fixing the Add and Remove API's
is the next task. Those are (to say the least) *really* confusing
because the caller should never have to call virObjectRef afterwards,
but some do because virDomainObjListAddLocked doesn't make enough
references on the obj (places the object in 2 lists, but only
accounts for 1). Lots of consumers that have to roll their own
"adjustments" because of that.
John Ferlan (20):
bhyve: Use virDomainObjListFindBy{UUID|ID}Ref
libxl: Fix possible deadlock in libxlDomainMigrateBegin3Params
libxl: Properly cleanup after libxlDomObjFromDomain
libxl: Use virDomainObjListFindBy{UUID|ID}Ref
openvz: Cleanup indention
openvz: Create accessors to virDomainObjListFindByUUID
openvz: Add more descriptive error message on Find failure
openvz: Use virDomainObjListFindBy{UUID|ID}Ref
uml: Create accessors to virDomainObjListFindByUUID
uml: Add more specific error message on failed FindBy call
uml: Use virDomainObjListFindBy{UUID|ID}Ref
vmware: Create accessors to virDomainObjListFindByUUID
vmware: Add more descriptive error message on Find failure
vmware: Properly clean up in vmwareDomainLookupByName
vmware: Use virDomainObjListFindBy{UUID|ID}Ref
vz: Unify vzDomObjFromDomain{Ref}
vz: Use virDomainObjListFindBy{UUID|ID}Ref
test: Use virDomainObjListFindByUUIDRef
conf: Rework/rename virDomainObjListFindByUUIDRef
conf: Rework/rename virDomainObjListFindByIDRef
src/bhyve/bhyve_driver.c | 52 ++----
src/conf/virdomainobjlist.c | 66 ++------
src/conf/virdomainobjlist.h | 4 -
src/libvirt_private.syms | 2 -
src/libxl/libxl_domain.c | 2 +-
src/libxl/libxl_driver.c | 99 ++++-------
src/libxl/libxl_migration.c | 3 +-
src/lxc/lxc_driver.c | 7 +-
src/openvz/openvz_driver.c | 392 ++++++++++++++-----------------------------
src/qemu/qemu_driver.c | 9 +-
src/test/test_driver.c | 8 +-
src/uml/uml_driver.c | 327 +++++++++++-------------------------
src/util/virclosecallbacks.c | 4 +-
src/vmware/vmware_driver.c | 234 +++++++++-----------------
src/vz/vz_driver.c | 117 +++++++------
src/vz/vz_sdk.c | 13 +-
src/vz/vz_utils.c | 34 +---
src/vz/vz_utils.h | 1 -
18 files changed, 458 insertions(+), 916 deletions(-)
--
2.13.6
6 years, 9 months
[libvirt] [PATCH 0/8] Move the minimum QEMU version closer to 1.3.0
by Ján Tomko
1.3.0 was released in December 2012, it merged KVM and QEMU and is
above our 1.2.0 requirement for QMP capability probing.
Ján Tomko (8):
virQEMUCapsParseHelpStr: remove unused check_yajl parameter
Mandate QEMU >= 0.15.0
Deprecate QEMU_CAPS_PCI_MULTIFUNCTION
Deprecate QEMU_CAPS_NETDEV
Clean up qemuDomainAttachNetDevice
Remove unused qemuDomainNetVLAN
Remove qemuDomainSupportsNetdev
Deprecate QEMU_CAPS_MONITOR_JSON
src/qemu/qemu_capabilities.c | 62 +-----
src/qemu/qemu_capabilities.h | 6 +-
src/qemu/qemu_capspriv.h | 1 -
src/qemu/qemu_command.c | 41 +---
src/qemu/qemu_domain.c | 16 --
src/qemu/qemu_domain.h | 6 -
src/qemu/qemu_driver.c | 18 +-
src/qemu/qemu_hotplug.c | 138 +++---------
src/qemu/qemu_interface.c | 2 +-
src/qemu/qemu_process.c | 8 +-
tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 3 -
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 3 -
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 3 -
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 3 -
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 3 -
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 3 -
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 3 -
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 3 -
tests/qemuhelpdata/qemu-0.12.1 | 198 -----------------
tests/qemuhelpdata/qemu-0.12.1-device | 62 ------
tests/qemuhelpdata/qemu-kvm-0.12.3 | 215 ------------------
tests/qemuhelpdata/qemu-kvm-0.12.3-device | 63 ------
tests/qemuhelpdata/qemu-kvm-0.13.0 | 242 ---------------------
tests/qemuhelpdata/qemu-kvm-0.13.0-device | 90 --------
tests/qemuhelptest.c | 130 +----------
.../aarch64-aavmf-virtio-mmio.args | 6 +-
tests/qemuxml2argvdata/aarch64-acpi-uefi.args | 2 +-
.../qemuxml2argvdata/aarch64-cpu-passthrough.args | 2 +-
tests/qemuxml2argvdata/aarch64-gic-host.args | 2 +-
tests/qemuxml2argvdata/aarch64-gic-none-tcg.args | 2 +-
tests/qemuxml2argvdata/aarch64-gic-v2.args | 2 +-
tests/qemuxml2argvdata/aarch64-gic-v3.args | 2 +-
tests/qemuxml2argvdata/aarch64-kvm-32-on-64.args | 6 +-
tests/qemuxml2argvdata/aarch64-noacpi-nouefi.args | 2 +-
tests/qemuxml2argvdata/aarch64-noacpi-uefi.args | 2 +-
tests/qemuxml2argvdata/aarch64-pci-serial.args | 2 +-
.../aarch64-usb-controller-nec-xhci.args | 2 +-
.../aarch64-usb-controller-qemu-xhci.args | 2 +-
tests/qemuxml2argvdata/aarch64-video-default.args | 2 +-
.../aarch64-video-virtio-gpu-pci.args | 8 +-
.../aarch64-virt-2.6-virtio-pci-default.args | 7 +-
.../qemuxml2argvdata/aarch64-virt-default-nic.args | 6 +-
tests/qemuxml2argvdata/aarch64-virt-virtio.args | 6 +-
.../aarch64-virtio-pci-default.args | 7 +-
.../aarch64-virtio-pci-manual-addresses.args | 12 +-
tests/qemuxml2argvdata/acpi-table.args | 2 +-
tests/qemuxml2argvdata/arm-vexpressa9-basic.args | 2 +-
tests/qemuxml2argvdata/arm-vexpressa9-nodevs.args | 2 +-
tests/qemuxml2argvdata/arm-vexpressa9-virtio.args | 6 +-
tests/qemuxml2argvdata/arm-virt-virtio.args | 6 +-
tests/qemuxml2argvdata/autoindex.args | 2 +-
tests/qemuxml2argvdata/balloon-ccw-deflate.args | 2 +-
tests/qemuxml2argvdata/balloon-device-auto.args | 2 +-
.../balloon-device-deflate-off.args | 2 +-
tests/qemuxml2argvdata/balloon-device-deflate.args | 2 +-
tests/qemuxml2argvdata/balloon-device-period.args | 2 +-
tests/qemuxml2argvdata/balloon-device.args | 2 +-
tests/qemuxml2argvdata/balloon-mmio-deflate.args | 2 +-
tests/qemuxml2argvdata/bios-nvram-secure.args | 2 +-
tests/qemuxml2argvdata/bios-nvram.args | 2 +-
tests/qemuxml2argvdata/bios.args | 2 +-
tests/qemuxml2argvdata/blkdeviotune-group-num.args | 2 +-
.../qemuxml2argvdata/blkdeviotune-max-length.args | 2 +-
tests/qemuxml2argvdata/blkdeviotune-max.args | 2 +-
tests/qemuxml2argvdata/blkdeviotune.args | 2 +-
tests/qemuxml2argvdata/blkiotune-device.args | 2 +-
tests/qemuxml2argvdata/blkiotune.args | 2 +-
tests/qemuxml2argvdata/boot-cdrom.args | 2 +-
tests/qemuxml2argvdata/boot-complex-bootindex.args | 13 +-
tests/qemuxml2argvdata/boot-complex.args | 12 +-
tests/qemuxml2argvdata/boot-floppy-q35.args | 2 +-
tests/qemuxml2argvdata/boot-floppy.args | 2 +-
.../boot-menu-disable-drive-bootindex.args | 2 +-
.../qemuxml2argvdata/boot-menu-disable-drive.args | 2 +-
tests/qemuxml2argvdata/boot-menu-disable.args | 2 +-
.../boot-menu-enable-bootindex.args | 2 +-
.../boot-menu-enable-with-timeout.args | 2 +-
tests/qemuxml2argvdata/boot-menu-enable.args | 2 +-
tests/qemuxml2argvdata/boot-multi.args | 2 +-
tests/qemuxml2argvdata/boot-network.args | 2 +-
tests/qemuxml2argvdata/boot-order.args | 8 +-
tests/qemuxml2argvdata/boot-strict.args | 13 +-
tests/qemuxml2argvdata/bootindex-floppy-q35.args | 2 +-
tests/qemuxml2argvdata/channel-guestfwd.args | 2 +-
tests/qemuxml2argvdata/channel-spicevmc-old.args | 2 +-
tests/qemuxml2argvdata/channel-spicevmc.args | 2 +-
tests/qemuxml2argvdata/channel-virtio-auto.args | 2 +-
tests/qemuxml2argvdata/channel-virtio-autoadd.args | 2 +-
.../channel-virtio-autoassign.args | 2 +-
tests/qemuxml2argvdata/channel-virtio-default.args | 2 +-
tests/qemuxml2argvdata/channel-virtio-state.args | 2 +-
tests/qemuxml2argvdata/channel-virtio-unix.args | 2 +-
tests/qemuxml2argvdata/channel-virtio.args | 2 +-
tests/qemuxml2argvdata/chardev-reconnect.args | 2 +-
tests/qemuxml2argvdata/clock-catchup.args | 2 +-
tests/qemuxml2argvdata/clock-france.args | 2 +-
tests/qemuxml2argvdata/clock-hpet-off.args | 2 +-
.../clock-localtime-basis-localtime.args | 2 +-
tests/qemuxml2argvdata/clock-localtime.args | 2 +-
tests/qemuxml2argvdata/clock-timer-hyperv-rtc.args | 2 +-
tests/qemuxml2argvdata/clock-utc.args | 2 +-
tests/qemuxml2argvdata/clock-variable.args | 2 +-
tests/qemuxml2argvdata/console-compat-auto.args | 2 +-
tests/qemuxml2argvdata/console-compat-chardev.args | 2 +-
tests/qemuxml2argvdata/console-compat.args | 2 +-
tests/qemuxml2argvdata/console-sclp.args | 2 +-
tests/qemuxml2argvdata/console-virtio-ccw.args | 2 +-
tests/qemuxml2argvdata/console-virtio-many.args | 2 +-
tests/qemuxml2argvdata/console-virtio-s390.args | 2 +-
tests/qemuxml2argvdata/console-virtio.args | 2 +-
tests/qemuxml2argvdata/controller-order.args | 7 +-
tests/qemuxml2argvdata/cpu-Haswell-noTSX.args | 2 +-
tests/qemuxml2argvdata/cpu-Haswell.args | 2 +-
tests/qemuxml2argvdata/cpu-Haswell2.args | 2 +-
tests/qemuxml2argvdata/cpu-Haswell3.args | 2 +-
tests/qemuxml2argvdata/cpu-cache-disable.args | 2 +-
tests/qemuxml2argvdata/cpu-cache-disable2.args | 2 +-
tests/qemuxml2argvdata/cpu-cache-disable3.args | 2 +-
tests/qemuxml2argvdata/cpu-cache-emulate-l3.args | 2 +-
tests/qemuxml2argvdata/cpu-cache-passthrough.args | 2 +-
tests/qemuxml2argvdata/cpu-cache-passthrough2.args | 2 +-
tests/qemuxml2argvdata/cpu-check-default-none.args | 2 +-
.../qemuxml2argvdata/cpu-check-default-none2.args | 2 +-
.../cpu-check-default-partial.args | 2 +-
.../cpu-check-default-partial2.args | 2 +-
tests/qemuxml2argvdata/cpu-check-none.args | 2 +-
tests/qemuxml2argvdata/cpu-eoi-disabled.args | 2 +-
tests/qemuxml2argvdata/cpu-eoi-enabled.args | 2 +-
tests/qemuxml2argvdata/cpu-exact1.args | 2 +-
tests/qemuxml2argvdata/cpu-exact2-nofallback.args | 2 +-
tests/qemuxml2argvdata/cpu-exact2.args | 2 +-
tests/qemuxml2argvdata/cpu-fallback.args | 2 +-
tests/qemuxml2argvdata/cpu-host-kvmclock.args | 2 +-
tests/qemuxml2argvdata/cpu-host-model-cmt.args | 2 +-
.../qemuxml2argvdata/cpu-host-model-fallback.args | 2 +-
tests/qemuxml2argvdata/cpu-host-model-vendor.args | 2 +-
tests/qemuxml2argvdata/cpu-host-model.args | 2 +-
.../cpu-host-passthrough-features.args | 2 +-
tests/qemuxml2argvdata/cpu-host-passthrough.args | 2 +-
tests/qemuxml2argvdata/cpu-hotplug-startup.args | 2 +-
tests/qemuxml2argvdata/cpu-kvmclock.args | 2 +-
tests/qemuxml2argvdata/cpu-minimum1.args | 2 +-
tests/qemuxml2argvdata/cpu-minimum2.args | 2 +-
tests/qemuxml2argvdata/cpu-numa-disjoint.args | 2 +-
tests/qemuxml2argvdata/cpu-numa-memshared.args | 2 +-
.../cpu-numa-no-memory-element.args | 2 +-
tests/qemuxml2argvdata/cpu-numa1.args | 2 +-
tests/qemuxml2argvdata/cpu-numa2.args | 2 +-
tests/qemuxml2argvdata/cpu-s390-features.args | 2 +-
tests/qemuxml2argvdata/cpu-s390-zEC12.args | 2 +-
tests/qemuxml2argvdata/cpu-strict1.args | 2 +-
tests/qemuxml2argvdata/cpu-topology1.args | 2 +-
tests/qemuxml2argvdata/cpu-topology2.args | 2 +-
tests/qemuxml2argvdata/cpu-topology3.args | 2 +-
tests/qemuxml2argvdata/cpu-tsc-frequency.args | 2 +-
tests/qemuxml2argvdata/cputune-numatune.args | 2 +-
tests/qemuxml2argvdata/cputune-zero-shares.args | 2 +-
tests/qemuxml2argvdata/cputune.args | 2 +-
tests/qemuxml2argvdata/debug-threads.args | 2 +-
tests/qemuxml2argvdata/default-kvm-host-arch.args | 2 +-
tests/qemuxml2argvdata/default-qemu-host-arch.args | 2 +-
tests/qemuxml2argvdata/disk-aio.args | 2 +-
tests/qemuxml2argvdata/disk-blockio.args | 2 +-
tests/qemuxml2argvdata/disk-cdrom-empty.args | 2 +-
tests/qemuxml2argvdata/disk-cdrom-network-ftp.args | 2 +-
.../qemuxml2argvdata/disk-cdrom-network-ftps.args | 2 +-
.../qemuxml2argvdata/disk-cdrom-network-http.args | 2 +-
.../qemuxml2argvdata/disk-cdrom-network-https.args | 2 +-
.../qemuxml2argvdata/disk-cdrom-network-tftp.args | 2 +-
.../disk-cdrom-tray-no-device-cap.args | 2 +-
tests/qemuxml2argvdata/disk-cdrom-tray.args | 2 +-
tests/qemuxml2argvdata/disk-cdrom.args | 2 +-
tests/qemuxml2argvdata/disk-copy_on_read.args | 8 +-
tests/qemuxml2argvdata/disk-drive-boot-cdrom.args | 2 +-
tests/qemuxml2argvdata/disk-drive-boot-disk.args | 2 +-
.../disk-drive-cache-directsync.args | 2 +-
.../qemuxml2argvdata/disk-drive-cache-unsafe.args | 2 +-
.../qemuxml2argvdata/disk-drive-cache-v2-none.args | 2 +-
tests/qemuxml2argvdata/disk-drive-cache-v2-wb.args | 2 +-
tests/qemuxml2argvdata/disk-drive-cache-v2-wt.args | 2 +-
.../qemuxml2argvdata/disk-drive-copy-on-read.args | 2 +-
.../qemuxml2argvdata/disk-drive-detect-zeroes.args | 2 +-
tests/qemuxml2argvdata/disk-drive-discard.args | 2 +-
tests/qemuxml2argvdata/disk-drive-fmt-qcow.args | 2 +-
.../disk-drive-network-gluster.args | 2 +-
.../disk-drive-network-iscsi-auth.args | 2 +-
.../disk-drive-network-iscsi-lun.args | 2 +-
.../qemuxml2argvdata/disk-drive-network-iscsi.args | 2 +-
.../disk-drive-network-nbd-export.args | 2 +-
.../disk-drive-network-nbd-ipv6-export.args | 2 +-
.../disk-drive-network-nbd-ipv6.args | 2 +-
.../disk-drive-network-nbd-unix.args | 2 +-
tests/qemuxml2argvdata/disk-drive-network-nbd.args | 2 +-
.../disk-drive-network-rbd-auth-AES.args | 2 +-
.../disk-drive-network-rbd-auth.args | 2 +-
.../disk-drive-network-rbd-ipv6.args | 2 +-
tests/qemuxml2argvdata/disk-drive-network-rbd.args | 2 +-
.../disk-drive-network-sheepdog.args | 2 +-
.../disk-drive-network-source-auth.args | 2 +-
.../disk-drive-network-tlsx509-vxhs.args | 2 +-
.../qemuxml2argvdata/disk-drive-network-vxhs.args | 2 +-
tests/qemuxml2argvdata/disk-drive-no-boot.args | 2 +-
.../qemuxml2argvdata/disk-drive-readonly-disk.args | 2 +-
.../disk-drive-readonly-no-device.args | 2 +-
.../disk-drive-shared-locking.args | 2 +-
tests/qemuxml2argvdata/disk-drive-shared.args | 2 +-
.../disk-floppy-tray-no-device-cap.args | 2 +-
tests/qemuxml2argvdata/disk-floppy-tray.args | 2 +-
tests/qemuxml2argvdata/disk-floppy.args | 2 +-
tests/qemuxml2argvdata/disk-geometry.args | 2 +-
.../disk-hostdev-scsi-virtio-iscsi-auth-AES.args | 2 +-
tests/qemuxml2argvdata/disk-ide-drive-split.args | 2 +-
tests/qemuxml2argvdata/disk-ide-wwn.args | 2 +-
tests/qemuxml2argvdata/disk-ioeventfd.args | 6 +-
tests/qemuxml2argvdata/disk-iscsi.args | 2 +-
.../qemuxml2argvdata/disk-many-format-probing.args | 2 +-
tests/qemuxml2argvdata/disk-many.args | 2 +-
tests/qemuxml2argvdata/disk-order.args | 2 +-
tests/qemuxml2argvdata/disk-sata-device.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-device-auto.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-device.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-disk-split.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-disk-vpd.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-disk-wwn.args | 2 +-
.../disk-scsi-lun-passthrough.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-megasas.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-mptsas1068.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-virtio-scsi.args | 2 +-
tests/qemuxml2argvdata/disk-scsi-vscsi.args | 2 +-
tests/qemuxml2argvdata/disk-serial.args | 2 +-
tests/qemuxml2argvdata/disk-snapshot.args | 2 +-
tests/qemuxml2argvdata/disk-source-pool-mode.args | 2 +-
tests/qemuxml2argvdata/disk-source-pool.args | 2 +-
.../disk-usb-device-removable.args | 2 +-
tests/qemuxml2argvdata/disk-usb-device.args | 2 +-
tests/qemuxml2argvdata/disk-virtio-ccw-many.args | 2 +-
tests/qemuxml2argvdata/disk-virtio-ccw.args | 2 +-
.../qemuxml2argvdata/disk-virtio-drive-queues.args | 2 +-
tests/qemuxml2argvdata/disk-virtio-s390.args | 2 +-
tests/qemuxml2argvdata/disk-virtio-scsi-ccw.args | 2 +-
.../disk-virtio-scsi-cmd_per_lun.args | 2 +-
.../disk-virtio-scsi-ioeventfd.args | 2 +-
.../disk-virtio-scsi-max_sectors.args | 2 +-
.../disk-virtio-scsi-num_queues.args | 2 +-
tests/qemuxml2argvdata/disk-virtio.args | 2 +-
tests/qemuxml2argvdata/encrypted-disk-usage.args | 2 +-
tests/qemuxml2argvdata/encrypted-disk.args | 2 +-
tests/qemuxml2argvdata/eoi-disabled.args | 2 +-
tests/qemuxml2argvdata/eoi-enabled.args | 2 +-
tests/qemuxml2argvdata/event_idx.args | 8 +-
.../fd-memory-no-numa-topology.args | 2 +-
.../qemuxml2argvdata/fd-memory-numa-topology.args | 2 +-
.../qemuxml2argvdata/fd-memory-numa-topology2.args | 2 +-
.../qemuxml2argvdata/fd-memory-numa-topology3.args | 2 +-
tests/qemuxml2argvdata/fips-enabled.args | 2 +-
tests/qemuxml2argvdata/floppy-drive-fat.args | 2 +-
tests/qemuxml2argvdata/fs9p-ccw.args | 2 +-
tests/qemuxml2argvdata/fs9p.args | 2 +-
.../qemuxml2argvdata/graphics-sdl-fullscreen.args | 2 +-
tests/qemuxml2argvdata/graphics-sdl.args | 2 +-
.../graphics-spice-agent-file-xfer.args | 2 +-
.../graphics-spice-agentmouse.args | 2 +-
.../graphics-spice-auto-socket-cfg.args | 2 +-
.../graphics-spice-auto-socket.args | 2 +-
.../graphics-spice-compression.args | 2 +-
tests/qemuxml2argvdata/graphics-spice-no-args.args | 2 +-
tests/qemuxml2argvdata/graphics-spice-qxl-vga.args | 2 +-
tests/qemuxml2argvdata/graphics-spice-sasl.args | 2 +-
tests/qemuxml2argvdata/graphics-spice-socket.args | 2 +-
tests/qemuxml2argvdata/graphics-spice-timeout.args | 7 +-
.../qemuxml2argvdata/graphics-spice-usb-redir.args | 2 +-
tests/qemuxml2argvdata/graphics-spice.args | 2 +-
.../graphics-vnc-auto-socket-cfg.args | 2 +-
.../qemuxml2argvdata/graphics-vnc-auto-socket.args | 2 +-
.../graphics-vnc-no-listen-attr.args | 2 +-
tests/qemuxml2argvdata/graphics-vnc-none.args | 2 +-
tests/qemuxml2argvdata/graphics-vnc-policy.args | 2 +-
.../graphics-vnc-remove-generated-socket.args | 2 +-
tests/qemuxml2argvdata/graphics-vnc-sasl.args | 2 +-
.../graphics-vnc-socket-new-cmdline.args | 2 +-
tests/qemuxml2argvdata/graphics-vnc-socket.args | 2 +-
tests/qemuxml2argvdata/graphics-vnc-tls.args | 2 +-
tests/qemuxml2argvdata/graphics-vnc-websocket.args | 2 +-
tests/qemuxml2argvdata/graphics-vnc.args | 2 +-
.../qemuxml2argvdata/hostdev-mdev-precreated.args | 2 +-
.../hostdev-pci-address-device.args | 2 +-
tests/qemuxml2argvdata/hostdev-pci-address.args | 2 +-
.../hostdev-scsi-lsi-iscsi-auth.args | 2 +-
tests/qemuxml2argvdata/hostdev-scsi-lsi-iscsi.args | 2 +-
tests/qemuxml2argvdata/hostdev-scsi-lsi.args | 2 +-
tests/qemuxml2argvdata/hostdev-scsi-readonly.args | 2 +-
.../hostdev-scsi-vhost-scsi-ccw.args | 2 +-
.../hostdev-scsi-vhost-scsi-pci.args | 2 +-
.../hostdev-scsi-vhost-scsi-pcie.args | 2 +-
.../hostdev-scsi-virtio-iscsi-auth.args | 2 +-
.../hostdev-scsi-virtio-iscsi.args | 2 +-
.../qemuxml2argvdata/hostdev-scsi-virtio-scsi.args | 2 +-
.../hostdev-usb-address-device-boot.args | 2 +-
.../hostdev-usb-address-device.args | 2 +-
tests/qemuxml2argvdata/hostdev-usb-address.args | 2 +-
.../qemuxml2argvdata/hostdev-vfio-multidomain.args | 2 +-
tests/qemuxml2argvdata/hostdev-vfio.args | 2 +-
tests/qemuxml2argvdata/hotplug-base.args | 2 +-
tests/qemuxml2argvdata/hugepages-memaccess.args | 2 +-
tests/qemuxml2argvdata/hugepages-memaccess2.args | 2 +-
tests/qemuxml2argvdata/hugepages-numa.args | 2 +-
tests/qemuxml2argvdata/hugepages-pages.args | 2 +-
tests/qemuxml2argvdata/hugepages-pages2.args | 2 +-
tests/qemuxml2argvdata/hugepages-pages3.args | 2 +-
tests/qemuxml2argvdata/hugepages-pages5.args | 2 +-
tests/qemuxml2argvdata/hugepages-pages6.args | 2 +-
tests/qemuxml2argvdata/hugepages-pages7.args | 2 +-
tests/qemuxml2argvdata/hugepages-shared.args | 2 +-
tests/qemuxml2argvdata/hugepages.args | 2 +-
tests/qemuxml2argvdata/hyperv-off.args | 2 +-
tests/qemuxml2argvdata/hyperv-panic.args | 2 +-
tests/qemuxml2argvdata/hyperv.args | 2 +-
tests/qemuxml2argvdata/input-usbmouse-addr.args | 2 +-
tests/qemuxml2argvdata/input-usbmouse.args | 2 +-
tests/qemuxml2argvdata/input-usbtablet.args | 2 +-
tests/qemuxml2argvdata/input-virtio-ccw.args | 2 +-
.../qemuxml2argvdata/intel-iommu-caching-mode.args | 7 +-
.../qemuxml2argvdata/intel-iommu-device-iotlb.args | 2 +-
tests/qemuxml2argvdata/intel-iommu-eim.args | 2 +-
tests/qemuxml2argvdata/intel-iommu-machine.args | 2 +-
tests/qemuxml2argvdata/intel-iommu.args | 2 +-
.../iothreads-disk-virtio-ccw.args | 2 +-
tests/qemuxml2argvdata/iothreads-disk.args | 2 +-
tests/qemuxml2argvdata/iothreads-ids-partial.args | 2 +-
tests/qemuxml2argvdata/iothreads-ids.args | 2 +-
.../iothreads-virtio-scsi-ccw.args | 2 +-
.../iothreads-virtio-scsi-pci.args | 2 +-
tests/qemuxml2argvdata/iothreads.args | 2 +-
tests/qemuxml2argvdata/kvm-features-off.args | 2 +-
tests/qemuxml2argvdata/kvm-features.args | 2 +-
tests/qemuxml2argvdata/kvm-pit-delay.args | 2 +-
tests/qemuxml2argvdata/kvm-pit-discard.args | 2 +-
tests/qemuxml2argvdata/kvm.args | 2 +-
tests/qemuxml2argvdata/kvmclock+eoi-disabled.args | 2 +-
tests/qemuxml2argvdata/kvmclock.args | 2 +-
tests/qemuxml2argvdata/luks-disks-source.args | 2 +-
tests/qemuxml2argvdata/luks-disks.args | 2 +-
.../qemuxml2argvdata/mach-virt-console-virtio.args | 2 +-
.../qemuxml2argvdata/mach-virt-serial-native.args | 2 +-
tests/qemuxml2argvdata/mach-virt-serial-pci.args | 2 +-
tests/qemuxml2argvdata/mach-virt-serial-usb.args | 2 +-
.../machine-aeskeywrap-off-cap.args | 2 +-
.../machine-aeskeywrap-off-caps.args | 2 +-
.../machine-aeskeywrap-on-cap.args | 2 +-
.../machine-aeskeywrap-on-caps.args | 2 +-
tests/qemuxml2argvdata/machine-aliases1.args | 2 +-
tests/qemuxml2argvdata/machine-aliases2.args | 2 +-
tests/qemuxml2argvdata/machine-core-cfg-off.args | 2 +-
tests/qemuxml2argvdata/machine-core-off.args | 2 +-
tests/qemuxml2argvdata/machine-core-on.args | 2 +-
.../machine-deakeywrap-off-cap.args | 2 +-
.../machine-deakeywrap-off-caps.args | 2 +-
.../machine-deakeywrap-on-cap.args | 2 +-
.../machine-deakeywrap-on-caps.args | 2 +-
.../machine-keywrap-none-caps.args | 2 +-
tests/qemuxml2argvdata/machine-keywrap-none.args | 2 +-
.../machine-loadparm-multiple-disks-nets-s390.args | 13 +-
.../machine-loadparm-net-s390.args | 8 +-
tests/qemuxml2argvdata/machine-loadparm-s390.args | 2 +-
tests/qemuxml2argvdata/machine-smm-opt.args | 2 +-
tests/qemuxml2argvdata/machine-usb-opt.args | 2 +-
tests/qemuxml2argvdata/machine-vmport-opt.args | 2 +-
tests/qemuxml2argvdata/master-key.args | 2 +-
.../qemuxml2argvdata/memory-hotplug-dimm-addr.args | 2 +-
tests/qemuxml2argvdata/memory-hotplug-dimm.args | 2 +-
.../memory-hotplug-nvdimm-access.args | 2 +-
.../memory-hotplug-nvdimm-label.args | 2 +-
tests/qemuxml2argvdata/memory-hotplug-nvdimm.args | 2 +-
.../memory-hotplug-ppc64-nonuma.args | 2 +-
tests/qemuxml2argvdata/memory-hotplug.args | 2 +-
tests/qemuxml2argvdata/memtune-unlimited.args | 2 +-
tests/qemuxml2argvdata/memtune.args | 2 +-
tests/qemuxml2argvdata/migrate-numa-unaligned.args | 2 +-
tests/qemuxml2argvdata/migrate.args | 2 +-
tests/qemuxml2argvdata/minimal-msg-timestamp.args | 2 +-
tests/qemuxml2argvdata/minimal.args | 2 +-
tests/qemuxml2argvdata/misc-acpi.args | 2 +-
tests/qemuxml2argvdata/misc-disable-s3.args | 2 +-
tests/qemuxml2argvdata/misc-disable-suspends.args | 2 +-
tests/qemuxml2argvdata/misc-enable-s4.args | 2 +-
tests/qemuxml2argvdata/misc-no-reboot.args | 2 +-
tests/qemuxml2argvdata/misc-uuid.args | 2 +-
tests/qemuxml2argvdata/mlock-off.args | 2 +-
tests/qemuxml2argvdata/mlock-on.args | 2 +-
tests/qemuxml2argvdata/mlock-unsupported.args | 2 +-
.../qemuxml2argvdata/multifunction-pci-device.args | 2 +-
tests/qemuxml2argvdata/name-escape.args | 2 +-
tests/qemuxml2argvdata/net-client.args | 7 +-
tests/qemuxml2argvdata/net-eth-hostip.args | 7 +-
tests/qemuxml2argvdata/net-eth-ifname.args | 7 +-
tests/qemuxml2argvdata/net-eth-names.args | 11 +-
tests/qemuxml2argvdata/net-eth.args | 7 +-
.../qemuxml2argvdata/net-hostdev-multidomain.args | 2 +-
.../net-hostdev-vfio-multidomain.args | 2 +-
tests/qemuxml2argvdata/net-hostdev-vfio.args | 2 +-
tests/qemuxml2argvdata/net-hostdev.args | 2 +-
tests/qemuxml2argvdata/net-mcast.args | 7 +-
tests/qemuxml2argvdata/net-server.args | 7 +-
tests/qemuxml2argvdata/net-udp.args | 8 +-
tests/qemuxml2argvdata/net-user-addr.args | 2 +-
tests/qemuxml2argvdata/net-user.args | 7 +-
tests/qemuxml2argvdata/net-vhostuser-multiq.args | 2 +-
tests/qemuxml2argvdata/net-vhostuser.args | 2 +-
tests/qemuxml2argvdata/net-virtio-ccw.args | 12 +-
tests/qemuxml2argvdata/net-virtio-device.args | 8 +-
.../net-virtio-disable-offloads.args | 6 +-
tests/qemuxml2argvdata/net-virtio-netdev.args | 2 +-
.../qemuxml2argvdata/net-virtio-rxtxqueuesize.args | 8 +-
tests/qemuxml2argvdata/net-virtio-s390.args | 6 +-
tests/qemuxml2argvdata/net-virtio.args | 7 +-
tests/qemuxml2argvdata/no-kvm-pit-device.args | 2 +-
tests/qemuxml2argvdata/nographics-display.args | 2 +-
tests/qemuxml2argvdata/nographics-vga.args | 2 +-
tests/qemuxml2argvdata/nographics.args | 2 +-
tests/qemuxml2argvdata/nosharepages.args | 2 +-
.../numad-auto-memory-vcpu-cpuset.args | 2 +-
...d-auto-memory-vcpu-no-cpuset-and-placement.args | 2 +-
.../numad-auto-vcpu-static-numatune.args | 2 +-
.../numad-static-memory-auto-vcpu.args | 2 +-
tests/qemuxml2argvdata/numad.args | 2 +-
.../numatune-auto-nodeset-invalid.args | 2 +-
tests/qemuxml2argvdata/numatune-auto-prefer.args | 2 +-
tests/qemuxml2argvdata/numatune-distances.args | 2 +-
.../numatune-memnode-no-memory.args | 2 +-
tests/qemuxml2argvdata/numatune-memnode.args | 2 +-
tests/qemuxml2argvdata/numatune-memory.args | 2 +-
tests/qemuxml2argvdata/panic-double.args | 2 +-
tests/qemuxml2argvdata/panic-no-address.args | 2 +-
tests/qemuxml2argvdata/panic.args | 2 +-
.../qemuxml2argvdata/parallel-parport-chardev.args | 2 +-
tests/qemuxml2argvdata/parallel-tcp-chardev.args | 2 +-
tests/qemuxml2argvdata/pci-autoadd-addr.args | 2 +-
tests/qemuxml2argvdata/pci-autoadd-idx.args | 2 +-
tests/qemuxml2argvdata/pci-autofill-addr.args | 2 +-
tests/qemuxml2argvdata/pci-bridge-many-disks.args | 2 +-
tests/qemuxml2argvdata/pci-bridge.args | 153 +++++++------
tests/qemuxml2argvdata/pci-expander-bus.args | 153 +++++++------
tests/qemuxml2argvdata/pci-many.args | 2 +-
tests/qemuxml2argvdata/pci-rom.args | 14 +-
tests/qemuxml2argvdata/pci-serial-dev-chardev.args | 2 +-
tests/qemuxml2argvdata/pcie-expander-bus.args | 157 +++++++------
.../pcie-root-port-model-generic.args | 2 +-
.../pcie-root-port-model-ioh3420.args | 2 +-
tests/qemuxml2argvdata/pcie-root-port.args | 2 +-
tests/qemuxml2argvdata/pcie-root.args | 2 +-
.../pcie-switch-downstream-port.args | 2 +-
.../pcie-switch-upstream-port.args | 2 +-
tests/qemuxml2argvdata/pcihole64-q35.args | 2 +-
tests/qemuxml2argvdata/pcihole64.args | 2 +-
tests/qemuxml2argvdata/pmu-feature-off.args | 2 +-
tests/qemuxml2argvdata/pmu-feature.args | 2 +-
tests/qemuxml2argvdata/ppc-dtb.args | 2 +-
.../ppc64-usb-controller-legacy.args | 2 +-
.../ppc64-usb-controller-qemu-xhci.args | 2 +-
tests/qemuxml2argvdata/ppc64-usb-controller.args | 2 +-
tests/qemuxml2argvdata/ppce500-serial.args | 2 +-
tests/qemuxml2argvdata/pseries-basic.args | 2 +-
tests/qemuxml2argvdata/pseries-console-virtio.args | 2 +-
.../pseries-cpu-compat-power9.args | 2 +-
tests/qemuxml2argvdata/pseries-cpu-compat.args | 2 +-
tests/qemuxml2argvdata/pseries-cpu-exact.args | 2 +-
tests/qemuxml2argvdata/pseries-cpu-le.args | 2 +-
tests/qemuxml2argvdata/pseries-features.args | 2 +-
tests/qemuxml2argvdata/pseries-hostdevs-1.args | 2 +-
tests/qemuxml2argvdata/pseries-hostdevs-2.args | 2 +-
tests/qemuxml2argvdata/pseries-hostdevs-3.args | 2 +-
.../pseries-machine-max-cpu-compat.args | 2 +-
tests/qemuxml2argvdata/pseries-many-buses-1.args | 2 +-
tests/qemuxml2argvdata/pseries-many-buses-2.args | 2 +-
tests/qemuxml2argvdata/pseries-many-devices.args | 2 +-
tests/qemuxml2argvdata/pseries-nvram.args | 2 +-
tests/qemuxml2argvdata/pseries-panic-missing.args | 2 +-
.../qemuxml2argvdata/pseries-panic-no-address.args | 2 +-
.../pseries-phb-default-missing.args | 2 +-
tests/qemuxml2argvdata/pseries-phb-numa-node.args | 2 +-
tests/qemuxml2argvdata/pseries-phb-simple.args | 2 +-
tests/qemuxml2argvdata/pseries-serial-native.args | 2 +-
tests/qemuxml2argvdata/pseries-serial-pci.args | 2 +-
tests/qemuxml2argvdata/pseries-serial-usb.args | 2 +-
tests/qemuxml2argvdata/pseries-usb-default.args | 2 +-
tests/qemuxml2argvdata/pseries-usb-kbd.args | 2 +-
tests/qemuxml2argvdata/pseries-usb-multi.args | 2 +-
.../pseries-vio-user-assigned.args | 2 +-
tests/qemuxml2argvdata/pseries-vio.args | 2 +-
tests/qemuxml2argvdata/pv-spinlock-disabled.args | 2 +-
tests/qemuxml2argvdata/pv-spinlock-enabled.args | 2 +-
tests/qemuxml2argvdata/q35-acpi-nouefi.args | 2 +-
tests/qemuxml2argvdata/q35-acpi-uefi.args | 2 +-
.../qemuxml2argvdata/q35-default-devices-only.args | 2 +-
tests/qemuxml2argvdata/q35-multifunction.args | 2 +-
tests/qemuxml2argvdata/q35-noacpi-nouefi.args | 2 +-
tests/qemuxml2argvdata/q35-pci-force-address.args | 7 +-
tests/qemuxml2argvdata/q35-pcie-autoadd.args | 2 +-
tests/qemuxml2argvdata/q35-pcie.args | 2 +-
.../qemuxml2argvdata/q35-pm-disable-fallback.args | 2 +-
tests/qemuxml2argvdata/q35-pm-disable.args | 2 +-
tests/qemuxml2argvdata/q35-usb2-multi.args | 2 +-
tests/qemuxml2argvdata/q35-usb2-reorder.args | 2 +-
tests/qemuxml2argvdata/q35-usb2.args | 2 +-
tests/qemuxml2argvdata/q35-virt-manager-basic.args | 2 +-
tests/qemuxml2argvdata/q35-virtio-pci.args | 2 +-
tests/qemuxml2argvdata/q35.args | 2 +-
tests/qemuxml2argvdata/qemu-ns-alt.args | 2 +-
.../qemuxml2argvdata/qemu-ns-commandline-ns0.args | 2 +-
.../qemuxml2argvdata/qemu-ns-commandline-ns1.args | 2 +-
tests/qemuxml2argvdata/qemu-ns-commandline.args | 2 +-
.../qemu-ns-domain-commandline-ns0.args | 2 +-
.../qemu-ns-domain-commandline.args | 2 +-
tests/qemuxml2argvdata/qemu-ns-domain-ns0.args | 2 +-
tests/qemuxml2argvdata/qemu-ns-no-env.args | 2 +-
tests/qemuxml2argvdata/qemu-ns.args | 2 +-
.../qemuxml2argvdata/reboot-timeout-disabled.args | 2 +-
tests/qemuxml2argvdata/reboot-timeout-enabled.args | 2 +-
tests/qemuxml2argvdata/restore-v2-fd.args | 2 +-
tests/qemuxml2argvdata/restore-v2.args | 2 +-
.../s390-allow-bogus-usb-controller.args | 2 +-
.../s390-allow-bogus-usb-none.args | 2 +-
tests/qemuxml2argvdata/s390-panic-missing.args | 2 +-
tests/qemuxml2argvdata/s390-panic-no-address.args | 2 +-
tests/qemuxml2argvdata/s390-serial-2.args | 2 +-
tests/qemuxml2argvdata/s390-serial-console.args | 2 +-
tests/qemuxml2argvdata/s390-serial.args | 2 +-
tests/qemuxml2argvdata/seclabel-dac-none.args | 2 +-
.../seclabel-dynamic-baselabel.args | 2 +-
.../seclabel-dynamic-labelskip.args | 2 +-
.../seclabel-dynamic-override.args | 2 +-
.../qemuxml2argvdata/seclabel-dynamic-relabel.args | 2 +-
tests/qemuxml2argvdata/seclabel-dynamic.args | 2 +-
tests/qemuxml2argvdata/seclabel-none.args | 2 +-
.../seclabel-static-labelskip.args | 2 +-
.../qemuxml2argvdata/seclabel-static-relabel.args | 2 +-
tests/qemuxml2argvdata/seclabel-static.args | 2 +-
.../serial-dev-chardev-iobase.args | 2 +-
tests/qemuxml2argvdata/serial-dev-chardev.args | 2 +-
tests/qemuxml2argvdata/serial-file-chardev.args | 2 +-
tests/qemuxml2argvdata/serial-file-log.args | 2 +-
tests/qemuxml2argvdata/serial-many-chardev.args | 2 +-
tests/qemuxml2argvdata/serial-pty-chardev.args | 2 +-
.../qemuxml2argvdata/serial-spiceport-nospice.args | 2 +-
tests/qemuxml2argvdata/serial-spiceport.args | 2 +-
tests/qemuxml2argvdata/serial-tcp-chardev.args | 2 +-
.../serial-tcp-telnet-chardev.args | 2 +-
.../serial-tcp-tlsx509-chardev-notls.args | 2 +-
.../serial-tcp-tlsx509-chardev-verify.args | 2 +-
.../serial-tcp-tlsx509-chardev.args | 2 +-
.../serial-tcp-tlsx509-secret-chardev.args | 2 +-
tests/qemuxml2argvdata/serial-udp-chardev.args | 2 +-
tests/qemuxml2argvdata/serial-unix-chardev.args | 2 +-
tests/qemuxml2argvdata/serial-vc-chardev.args | 2 +-
tests/qemuxml2argvdata/shmem-plain-doorbell.args | 2 +-
tests/qemuxml2argvdata/shmem.args | 2 +-
tests/qemuxml2argvdata/smartcard-controller.args | 2 +-
.../smartcard-host-certificates.args | 2 +-
tests/qemuxml2argvdata/smartcard-host.args | 2 +-
.../smartcard-passthrough-spicevmc.args | 2 +-
.../smartcard-passthrough-tcp.args | 2 +-
tests/qemuxml2argvdata/smbios.args | 2 +-
tests/qemuxml2argvdata/smp.args | 2 +-
tests/qemuxml2argvdata/sound-device.args | 2 +-
tests/qemuxml2argvdata/sound.args | 2 +-
tests/qemuxml2argvdata/tpm-passthrough.args | 2 +-
.../usb-controller-default-q35.args | 2 +-
.../usb-controller-explicit-q35.args | 2 +-
.../qemuxml2argvdata/usb-controller-qemu-xhci.args | 2 +-
tests/qemuxml2argvdata/usb-controller-xhci.args | 2 +-
tests/qemuxml2argvdata/usb-controller.args | 2 +-
tests/qemuxml2argvdata/usb-hub-autoadd-deluxe.args | 2 +-
tests/qemuxml2argvdata/usb-hub-autoadd.args | 2 +-
tests/qemuxml2argvdata/usb-hub.args | 2 +-
tests/qemuxml2argvdata/usb-ich9-autoassign.args | 2 +-
tests/qemuxml2argvdata/usb-ich9-companion.args | 2 +-
tests/qemuxml2argvdata/usb-ich9-ehci-addr.args | 2 +-
tests/qemuxml2argvdata/usb-long-port-path.args | 2 +-
tests/qemuxml2argvdata/usb-none.args | 2 +-
tests/qemuxml2argvdata/usb-piix3-controller.args | 2 +-
tests/qemuxml2argvdata/usb-port-autoassign.args | 2 +-
tests/qemuxml2argvdata/usb-port-missing.args | 2 +-
tests/qemuxml2argvdata/usb-ports.args | 2 +-
tests/qemuxml2argvdata/usb-redir-boot.args | 2 +-
.../qemuxml2argvdata/usb-redir-filter-version.args | 2 +-
tests/qemuxml2argvdata/usb-redir-filter.args | 2 +-
tests/qemuxml2argvdata/usb-redir.args | 2 +-
tests/qemuxml2argvdata/usb-xhci-autoassign.args | 2 +-
tests/qemuxml2argvdata/usb1-usb2.args | 2 +-
tests/qemuxml2argvdata/user-aliases-usb.args | 2 +-
tests/qemuxml2argvdata/user-aliases.args | 20 +-
tests/qemuxml2argvdata/vcpu-placement-static.args | 2 +-
.../video-device-pciaddr-default.args | 2 +-
.../qemuxml2argvdata/video-qxl-device-vgamem.args | 2 +-
tests/qemuxml2argvdata/video-qxl-device.args | 2 +-
tests/qemuxml2argvdata/video-qxl-heads.args | 2 +-
tests/qemuxml2argvdata/video-qxl-nodevice.args | 2 +-
tests/qemuxml2argvdata/video-qxl-noheads.args | 2 +-
.../video-qxl-sec-device-vgamem.args | 2 +-
tests/qemuxml2argvdata/video-qxl-sec-device.args | 2 +-
.../qemuxml2argvdata/video-vga-device-vgamem.args | 2 +-
tests/qemuxml2argvdata/video-vga-device.args | 2 +-
tests/qemuxml2argvdata/video-vga-nodevice.args | 2 +-
tests/qemuxml2argvdata/video-vga-qxl-heads.args | 2 +-
tests/qemuxml2argvdata/video-virtio-gpu-ccw.args | 2 +-
.../qemuxml2argvdata/video-virtio-gpu-device.args | 2 +-
.../video-virtio-gpu-secondary.args | 2 +-
.../video-virtio-gpu-spice-gl.args | 2 +-
tests/qemuxml2argvdata/video-virtio-gpu-virgl.args | 2 +-
tests/qemuxml2argvdata/video-virtio-vga.args | 2 +-
.../qemuxml2argvdata/virtio-input-passthrough.args | 2 +-
tests/qemuxml2argvdata/virtio-input.args | 2 +-
tests/qemuxml2argvdata/virtio-lun.args | 7 +-
tests/qemuxml2argvdata/virtio-options.args | 8 +-
tests/qemuxml2argvdata/virtio-rng-ccw.args | 2 +-
tests/qemuxml2argvdata/virtio-rng-default.args | 2 +-
tests/qemuxml2argvdata/virtio-rng-egd.args | 2 +-
tests/qemuxml2argvdata/virtio-rng-multiple.args | 2 +-
tests/qemuxml2argvdata/virtio-rng-random.args | 2 +-
tests/qemuxml2argvdata/vmcoreinfo.args | 2 +-
tests/qemuxml2argvdata/watchdog-device.args | 2 +-
tests/qemuxml2argvdata/watchdog-diag288.args | 2 +-
tests/qemuxml2argvdata/watchdog-dump.args | 2 +-
tests/qemuxml2argvdata/watchdog-injectnmi.args | 2 +-
tests/qemuxml2argvdata/watchdog.args | 2 +-
tests/qemuxml2argvdata/x86-kvm-32-on-64.args | 2 +-
tests/qemuxml2argvtest.c | 90 ++------
tests/qemuxml2xmltest.c | 35 +--
648 files changed, 1097 insertions(+), 2336 deletions(-)
delete mode 100644 tests/qemuhelpdata/qemu-0.12.1
delete mode 100644 tests/qemuhelpdata/qemu-0.12.1-device
delete mode 100644 tests/qemuhelpdata/qemu-kvm-0.12.3
delete mode 100644 tests/qemuhelpdata/qemu-kvm-0.12.3-device
delete mode 100644 tests/qemuhelpdata/qemu-kvm-0.13.0
delete mode 100644 tests/qemuhelpdata/qemu-kvm-0.13.0-device
--
2.16.1
6 years, 9 months
[libvirt] [PATCH] qemu_monitor_json: Properly check "return" type
by Jiri Denemark
My commit 2e0d6cdec41 claimed qemuMonitorJSONCheckError guarantees
"return" object exists in the JSON reply. But it only makes sure the key
is there, while the type of the value is not checked. A lot of callers
do not care since they only want to see whether their QMP command failed
or not, but any caller which needs to read some data from the reply
wants to make sure the correct data type was returned.
This patch adds a new API called qemuMonitorJSONCheckReply which calls
qemuMonitorJSONCheckError and checks "return" contains a value of the
specified type.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_monitor_json.c | 261 ++++++++++++++++++-------------------------
1 file changed, 108 insertions(+), 153 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d80c4f18d1..b251fc9964 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -413,6 +413,36 @@ qemuMonitorJSONCheckError(virJSONValuePtr cmd,
}
+static int
+qemuMonitorJSONCheckReply(virJSONValuePtr cmd,
+ virJSONValuePtr reply,
+ virJSONType type)
+{
+ virJSONValuePtr data;
+
+ if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ return -1;
+
+ data = virJSONValueObjectGet(reply, "return");
+ if (data->type != type) {
+ char *cmdstr = virJSONValueToString(cmd, false);
+ char *retstr = virJSONValueToString(data, false);
+
+ VIR_DEBUG("Unexpected return type %d (expecting %d) for command %s: %s",
+ data->type, type, cmdstr, retstr);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unexpected type returned by QEMU command '%s'"),
+ qemuMonitorJSONCommandName(cmd));
+
+ VIR_FREE(cmdstr);
+ VIR_FREE(retstr);
+ return -1;
+ }
+
+ return 0;
+}
+
+
static bool
qemuMonitorJSONErrorIsClass(virJSONValuePtr error,
const char *klass)
@@ -1389,7 +1419,7 @@ qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -1616,7 +1646,7 @@ int qemuMonitorJSONGetVirtType(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -1777,7 +1807,7 @@ qemuMonitorJSONGetBalloonInfo(qemuMonitorPtr mon,
}
/* See if any other fatal error occurred */
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -1878,7 +1908,7 @@ int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon,
}
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -1956,14 +1986,10 @@ qemuMonitorJSONQueryBlock(qemuMonitorPtr mon)
return NULL;
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0 ||
- qemuMonitorJSONCheckError(cmd, reply) < 0)
+ qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(devices = virJSONValueObjectStealArray(reply, "return"))) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-block reply was missing device list"));
- goto cleanup;
- }
+ devices = virJSONValueObjectStealArray(reply, "return");
cleanup:
virJSONValueFree(cmd);
@@ -2163,14 +2189,10 @@ qemuMonitorJSONQueryBlockstats(qemuMonitorPtr mon)
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(ret = virJSONValueObjectStealArray(reply, "return"))) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-blockstats reply was missing device list"));
- goto cleanup;
- }
+ ret = virJSONValueObjectStealArray(reply, "return");
cleanup:
virJSONValueFree(cmd);
@@ -2705,13 +2727,12 @@ qemuMonitorJSONGetMigrationCacheSize(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_NUMBER) < 0)
goto cleanup;
if (virJSONValueObjectGetNumberUlong(reply, "return", cacheSize) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-migrate-cache-size reply was missing "
- "'return' data"));
+ _("invalid cache size in query-migrate-cache-size reply"));
goto cleanup;
}
@@ -2773,7 +2794,7 @@ qemuMonitorJSONGetMigrationParams(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
result = virJSONValueObjectGet(reply, "return");
@@ -3133,7 +3154,7 @@ int qemuMonitorJSONGetMigrationStats(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
if (qemuMonitorJSONGetMigrationStatsReply(reply, stats, error) < 0)
@@ -3225,7 +3246,7 @@ qemuMonitorJSONQueryDump(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
result = virJSONValueObjectGetObject(reply, "return");
@@ -3262,7 +3283,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
caps = virJSONValueObjectGetObject(reply, "return");
@@ -3434,7 +3455,7 @@ qemuMonitorJSONAddFd(qemuMonitorPtr mon, int fdset, int fd, const char *name)
ret = -2;
goto cleanup;
}
- ret = qemuMonitorJSONCheckError(cmd, reply);
+ ret = qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT);
}
if (ret == 0) {
virJSONValuePtr data = virJSONValueObjectGetObject(reply, "return");
@@ -3561,11 +3582,8 @@ qemuMonitorJSONQueryRxFilterParse(virJSONValuePtr msg,
if (!fil)
goto cleanup;
- if (!(returnArray = virJSONValueObjectGetArray(msg, "return"))) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-rx-filter reply was missing return data"));
- goto cleanup;
- }
+ returnArray = virJSONValueObjectGetArray(msg, "return");
+
if (!(entry = virJSONValueArrayGet(returnArray, 0))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("query -rx-filter return data missing array element"));
@@ -3739,7 +3757,7 @@ qemuMonitorJSONQueryRxFilter(qemuMonitorPtr mon, const char *alias,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
if (qemuMonitorJSONQueryRxFilterParse(reply, filter) < 0)
@@ -3776,11 +3794,7 @@ qemuMonitorJSONExtractChardevInfo(virJSONValuePtr reply,
size_t i;
qemuMonitorChardevInfoPtr entry = NULL;
- if (!(data = virJSONValueObjectGetArray(reply, "return"))) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("character device reply was missing return data"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
for (i = 0; i < virJSONValueArraySize(data); i++) {
virJSONValuePtr chardev = virJSONValueArrayGet(data, i);
@@ -3857,7 +3871,7 @@ qemuMonitorJSONGetChardevInfo(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
ret = qemuMonitorJSONExtractChardevInfo(reply, info);
@@ -5035,7 +5049,7 @@ int qemuMonitorJSONGetVersion(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -5101,15 +5115,11 @@ int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-machines reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(infolist, n + 1) < 0)
@@ -5206,15 +5216,11 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-cpu-definitions reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
if (VIR_ALLOC_N(cpulist, n) < 0)
goto cleanup;
@@ -5411,7 +5417,7 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -5494,15 +5500,11 @@ int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-commands reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(commandlist, n + 1) < 0)
@@ -5559,15 +5561,11 @@ int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-events reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(eventlist, n + 1) < 0)
@@ -5744,7 +5742,7 @@ int qemuMonitorJSONGetKVMState(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -5784,15 +5782,11 @@ int qemuMonitorJSONGetObjectTypes(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("qom-list-types reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(typelist, n + 1) < 0)
@@ -5846,15 +5840,11 @@ int qemuMonitorJSONGetObjectListPaths(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("qom-list reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(pathlist, n + 1) < 0)
@@ -6085,15 +6075,11 @@ int qemuMonitorJSONGetObjectProps(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("device-list-properties reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(proplist, n + 1) < 0)
@@ -6140,7 +6126,7 @@ qemuMonitorJSONGetTargetArch(qemuMonitorPtr mon)
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
@@ -6186,15 +6172,11 @@ qemuMonitorJSONGetMigrationCapabilities(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(caps = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(caps)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("missing migration capabilities"));
- goto cleanup;
- }
+ caps = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(caps);
if (VIR_ALLOC_N(list, n + 1) < 0)
goto cleanup;
@@ -6330,15 +6312,11 @@ qemuMonitorJSONGetGICCapabilities(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(caps = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(caps)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("missing GIC capabilities"));
- goto cleanup;
- }
+ caps = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(caps);
/* If the returned array was empty we have to return successfully */
if (n == 0) {
@@ -6555,16 +6533,11 @@ qemuMonitorJSONGetStringArray(qemuMonitorPtr mon, const char *qmpCmd,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("%s reply data was not an array"),
- qmpCmd);
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(list, n + 1) < 0)
@@ -6792,8 +6765,13 @@ qemuMonitorJSONAttachCharDev(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
- goto cleanup;
+ if (chr->type == VIR_DOMAIN_CHR_TYPE_PTY) {
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
+ goto cleanup;
+ } else {
+ if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ goto cleanup;
+ }
if (chr->type == VIR_DOMAIN_CHR_TYPE_PTY) {
virJSONValuePtr data = virJSONValueObjectGetObject(reply, "return");
@@ -6939,11 +6917,7 @@ qemuMonitorJSONParseCPUx86Features(virJSONValuePtr data)
size_t i;
ssize_t n;
- if (!data || (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("invalid array of CPUID features"));
- goto error;
- }
+ n = virJSONValueArraySize(data);
if (!(cpudata = virCPUDataNew(VIR_ARCH_X86_64)))
goto error;
@@ -6982,7 +6956,7 @@ qemuMonitorJSONGetCPUx86Data(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply))
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
data = virJSONValueObjectGetArray(reply, "return");
@@ -7029,15 +7003,11 @@ qemuMonitorJSONCheckCPUx86(qemuMonitorPtr mon)
}
}
- if (qemuMonitorJSONCheckError(cmd, reply))
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("qom-list reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
for (i = 0; i < n; i++) {
virJSONValuePtr element = virJSONValueArrayGet(data, i);
@@ -7162,15 +7132,11 @@ qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-iothreads reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
/* null-terminated list */
if (VIR_ALLOC_N(infolist, n + 1) < 0)
@@ -7251,15 +7217,11 @@ qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitorPtr mon,
goto cleanup;
}
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(data = virJSONValueObjectGetArray(reply, "return")) ||
- (n = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-memory-devices reply data was not an array"));
- goto cleanup;
- }
+ data = virJSONValueObjectGetArray(reply, "return");
+ n = virJSONValueArraySize(data);
for (i = 0; i < n; i++) {
virJSONValuePtr elem = virJSONValueArrayGet(data, i);
@@ -7582,7 +7544,7 @@ qemuMonitorJSONGetRTCTime(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_OBJECT) < 0)
goto cleanup;
data = virJSONValueObjectGet(reply, "return");
@@ -7741,16 +7703,11 @@ qemuMonitorJSONGetHotpluggableCPUs(qemuMonitorPtr mon,
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
data = virJSONValueObjectGet(reply, "return");
-
- if ((ninfo = virJSONValueArraySize(data)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-hotpluggable-cpus reply is not an array"));
- goto cleanup;
- }
+ ninfo = virJSONValueArraySize(data);
if (VIR_ALLOC_N(info, ninfo) < 0)
goto cleanup;
@@ -7789,12 +7746,10 @@ qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon)
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
- if (!(ret = virJSONValueObjectStealArray(reply, "return")))
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("query-qmp-schema reply is not an array"));
+ ret = virJSONValueObjectStealArray(reply, "return");
cleanup:
virJSONValueFree(cmd);
@@ -7848,7 +7803,7 @@ qemuMonitorJSONQueryNamedBlockNodes(qemuMonitorPtr mon)
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
- if (qemuMonitorJSONCheckError(cmd, reply) < 0)
+ if (qemuMonitorJSONCheckReply(cmd, reply, VIR_JSON_TYPE_ARRAY) < 0)
goto cleanup;
ret = virJSONValueObjectStealArray(reply, "return");
--
2.16.3
6 years, 9 months
[libvirt] [PATCH] virsh: add missing help info of --source to domifaddr
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
commit b4b5c82ce forgot to add this.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
tools/virsh-domain-monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 68da11ed5..0f768d394 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -2160,7 +2160,7 @@ static const vshCmdOptDef opts_domifaddr[] = {
{.name = "source",
.type = VSH_OT_STRING,
.flags = VSH_OFLAG_NONE,
- .help = N_("address source: 'lease' or 'agent'")},
+ .help = N_("address source: 'lease', 'agent' or 'arp'")},
{.name = NULL}
};
--
2.14.3
6 years, 9 months
[libvirt] [PATCH libvirt sparse files under format=qcow2 v1 0/2] Problem: libvirt fails to create fully allocated qcow2 storage objects.
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
When virt-install requests to create fully allocated storage object when
the parameter sparse=no is set, libvirt doesn't allow that to happen
for qcow2 formatted files.
Regardless of its XML instuction request libvirt always targets its
filesystem object storage with preallocation=metadata if format=qcow2
is in effect. This results in sparse files which could cause problems
since total image storage potentially can overrun actual filesystem
available space.
Wim ten Have (2):
libvirt can't create fully allocated qcow2 formatted storage objects.
Adjust qemu-img test required to target with preallocation=falloc.
include/libvirt/libvirt-storage.h | 5 ++++-
src/storage/storage_util.c | 21 +++++++++++++++++----
.../qcow2-nocapacity-convert-prealloc.argv | 2 +-
3 files changed, 22 insertions(+), 6 deletions(-)
--
2.14.3
6 years, 9 months
[libvirt] [PATCH] qemu: Use dynamic buffer for storing PTY aliases
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1560976
For historical reasons we've used 32 bytes long static buffer for
storing PTY aliases. This breaks users scenario where they try to
start a machine with user alias consisting of "ua-$uuid".
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_process.c | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1afb71f113..c0105c8b84 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1949,21 +1949,18 @@ qemuProcessLookupPTYs(virDomainChrDefPtr *devices,
int count,
virHashTablePtr info)
{
+ char *id = NULL;
size_t i;
+ int ret = -1;
for (i = 0; i < count; i++) {
virDomainChrDefPtr chr = devices[i];
if (chr->source->type == VIR_DOMAIN_CHR_TYPE_PTY) {
- char id[32];
qemuMonitorChardevInfoPtr entry;
- if (snprintf(id, sizeof(id), "char%s",
- chr->info.alias) >= sizeof(id)) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("failed to format device alias "
- "for PTY retrieval"));
+ VIR_FREE(id);
+ if (virAsprintf(&id, "char%s", chr->info.alias) < 0)
return -1;
- }
entry = virHashLookup(info, id);
if (!entry || !entry->ptyPath) {
@@ -1973,7 +1970,7 @@ qemuProcessLookupPTYs(virDomainChrDefPtr *devices,
*/
virReportError(VIR_ERR_INTERNAL_ERROR,
_("no assigned pty for device %s"), id);
- return -1;
+ goto cleanup;
} else {
/* 'info chardev' had no pty path for this chardev,
* but the log output had, so we're fine
@@ -1984,11 +1981,14 @@ qemuProcessLookupPTYs(virDomainChrDefPtr *devices,
VIR_FREE(chr->source->data.file.path);
if (VIR_STRDUP(chr->source->data.file.path, entry->ptyPath) < 0)
- return -1;
+ goto cleanup;
}
}
- return 0;
+ ret = 0;
+ cleanup:
+ VIR_FREE(id);
+ return ret;
}
static int
@@ -2040,7 +2040,8 @@ qemuProcessRefreshChannelVirtioState(virQEMUDriverPtr driver,
int agentReason = VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNEL;
qemuMonitorChardevInfoPtr entry;
virObjectEventPtr event = NULL;
- char id[32];
+ char *id = NULL;
+ int ret = -1;
if (booted)
agentReason = VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED;
@@ -2048,13 +2049,10 @@ qemuProcessRefreshChannelVirtioState(virQEMUDriverPtr driver,
for (i = 0; i < vm->def->nchannels; i++) {
virDomainChrDefPtr chr = vm->def->channels[i];
if (chr->targetType == VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO) {
- if (snprintf(id, sizeof(id), "char%s",
- chr->info.alias) >= sizeof(id)) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("failed to format device alias "
- "for PTY retrieval"));
- return -1;
- }
+
+ VIR_FREE(id);
+ if (virAsprintf(&id, "char%s", chr->info.alias) < 0)
+ goto cleanup;
/* port state not reported */
if (!(entry = virHashLookup(info, id)) ||
@@ -2071,7 +2069,10 @@ qemuProcessRefreshChannelVirtioState(virQEMUDriverPtr driver,
}
}
- return 0;
+ ret = 0;
+ cleanup:
+ VIR_FREE(id);
+ return ret;
}
--
2.16.1
6 years, 9 months
Re: [libvirt] [PATCH] snip my name and email
by Daniel P. Berrangé
On Mon, Mar 26, 2018 at 10:29:06AM +0300, David Kiarie wrote:
> I'd like to snip my name and email from these files
Any particular reason why ?
> ---
> src/xenconfig/xen_xl.c | 1 -
> src/xenconfig/xen_xl.h | 1 -
> 2 files changed, 2 deletions(-)
It is also mentioned in test/xlconfigtest.c.
NB, your name & email are still recorded in git history and email
archives for eternity
Your name, but not email, is also mentioned in the news files,
and that file isn't one we'd want to remove since its relevant
historical record.
>
> diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c
> index e1ec8e7..a3f8af1 100644
> --- a/src/xenconfig/xen_xl.c
> +++ b/src/xenconfig/xen_xl.c
> @@ -17,7 +17,6 @@
> * License along with this library. If not, see
> * <http://www.gnu.org/licenses/>.
> *
> - * Author: Kiarie Kahurani <davidkiarie4(a)gmail.com>
> * Author: Jim Fehlig <jfehlig(a)suse.com>
> */
>
> diff --git a/src/xenconfig/xen_xl.h b/src/xenconfig/xen_xl.h
> index dd96326..8342f53 100644
> --- a/src/xenconfig/xen_xl.h
> +++ b/src/xenconfig/xen_xl.h
> @@ -17,7 +17,6 @@
> * License along with this library. If not, see
> * <http://www.gnu.org/licenses/>.
> *
> - * Author: Kiarie Kahurani<davidkiarie4(a)gmail.com>
> */
>
> #ifndef __VIR_XEN_XL_H__
> --
> 2.16.2
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
6 years, 9 months
[libvirt] [PATCH] remote: remove outdated comment about Solaris
by Daniel P. Berrangé
When removing a conditional in:
commit da1ade7a52e040192c5e9396c15ec9225a0a2c48
Author: Daniel P. Berrangé <berrange(a)redhat.com>
Date: Fri Mar 23 10:50:59 2018 +0000
remote: remove some __sun conditionals
the corresponding comment was mistakenly left behind.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as trivial fix.
src/remote/remote_driver.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 34e5ced0a9..325ef3fa3d 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -1344,9 +1344,7 @@ remoteConnectOpen(virConnectPtr conn,
/*
* If URI is NULL, then do a UNIX connection possibly auto-spawning
- * unprivileged server and probe remote server for URI. On Solaris,
- * this isn't supported, but we may be privileged enough to connect
- * to the UNIX socket anyway.
+ * unprivileged server and probe remote server for URI.
*/
if (!conn->uri) {
VIR_DEBUG("Auto-probe remote URI");
--
2.14.3
6 years, 9 months