]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: simplify monitor fd error handling
authorEric Blake <eblake@redhat.com>
Wed, 16 Mar 2011 01:38:06 +0000 (19:38 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 21 Mar 2011 16:47:48 +0000 (10:47 -0600)
commit058d4efa5839003e7952aac45618b282c4129e35
tree6f9d7dfb5f6474f94d8d47a417132f7cf3323d4d
parent4c7508b4decbade955ad1b6d28dad7f03cdb482b
qemu: simplify monitor fd error handling

qemu_monitor was already returning -1 and setting errno to EINVAL
on any attempt to send an fd without a unix socket, but this was
a silent failure in the case of qemuDomainAttachHostPciDevice.
Meanwhile, qemuDomainAttachNetDevice was doing some sanity checking
for a better error message; it's better to consolidate that to a
central point in the API.

* src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Move sanity
checking...
* src/qemu/qemu_monitor.c (qemuMonitorSendFileHandle): ...into
central location.
Suggested by Chris Wright.
src/qemu/qemu_hotplug.c
src/qemu/qemu_monitor.c