libvirt/src/qemu
Osier Yang fab4f0c699 qemu: Fix a regression of attaching device
The regression is introduced by Commit da1eba6b, the new
codes with this commit doesn't reset "ret" to "-1" when
it fails on parsing the device XML (live device attachment)

This patch changes the codes to reset the "ret" and "-1",
and also changes the codes so that it don't modify "ret"
for condition checking.

How to reproduce:

% cat test.xml
<disk type='oops' device='disk'>
  <driver name='qemu' type='raw'/>
  <source file='/var/lib/libvirt/images/test.img'/>
  <target dev='vda' bus='virtio'/>
</disk>

% virsh attach-device $domain test.xml
Device attached successfully

The device attachment failed actually with error "unknown disk type 'oops'",
however, it reports success.
2011-07-16 11:27:34 +08:00
..
libvirtd_qemu.aug Integrate the QEMU driver with the lock manager infrastructure 2011-06-02 10:54:01 +01:00
qemu_bridge_filter.c Remove conn parameter from virReportSystemError 2010-02-09 01:04:54 +01:00
qemu_bridge_filter.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu_capabilities.c bios: Add support for SGA 2011-07-11 11:47:14 +02:00
qemu_capabilities.h bios: Add support for SGA 2011-07-11 11:47:14 +02:00
qemu_cgroup.c Move qemu_audit.h helpers into shared code 2011-07-12 17:05:25 +01:00
qemu_cgroup.h qemu: update qemuCgroupControllerActive signature 2011-05-04 09:35:47 -06:00
qemu_command.c Move qemu_audit.h helpers into shared code 2011-07-12 17:05:25 +01:00
qemu_command.h Add a method for extracting QEMU argv from /proc 2011-07-12 15:39:04 +01:00
qemu_conf.c Allow per-driver config file for lock manager plugins 2011-06-28 18:07:06 +01:00
qemu_conf.h Add infrastructure to automatically destroy guests when a connection closes 2011-06-24 12:15:10 +01:00
qemu_domain.c qemu: reject unknown flags 2011-07-13 14:44:09 -06:00
qemu_domain.h build: avoid ATTRIBUTE_UNUSED in headers 2011-07-14 07:51:30 -06:00
qemu_driver.c qemu: Fix a regression of attaching device 2011-07-16 11:27:34 +08:00
qemu_driver.h Split all QEMU process mangement code into separate file 2011-02-17 12:48:55 +00:00
qemu_hostdev.c reattach pci devices when qemuPrepareHostdevPCIDevices() failed 2011-04-07 13:09:46 +08:00
qemu_hostdev.h Move QEMU hostdev helper code out of the QEMU driver 2010-12-17 13:50:21 +00:00
qemu_hotplug.c qemu: Fix monitor unlocking in some error paths 2011-07-13 01:53:32 +02:00
qemu_hotplug.h Allow leases to be hotpluged with QEMU guests 2011-06-02 10:54:01 +01:00
qemu_migration.c flags: fix qemu migration regression 2011-07-15 12:34:00 -06:00
qemu_migration.h flags: fix qemu migration regression 2011-07-15 12:34:00 -06:00
qemu_monitor_json.c Add monitor API for checking whether KVM is enabled 2011-07-12 15:39:04 +01:00
qemu_monitor_json.h Add monitor API for checking whether KVM is enabled 2011-07-12 15:39:04 +01:00
qemu_monitor_text.c Add monitor API for checking whether KVM is enabled 2011-07-12 15:39:04 +01:00
qemu_monitor_text.h Add monitor API for checking whether KVM is enabled 2011-07-12 15:39:04 +01:00
qemu_monitor.c qemu: Don't overwrite errors by closefd in error paths 2011-07-14 16:10:17 +02:00
qemu_monitor.h qemu: Don't overwrite errors by closefd in error paths 2011-07-14 16:10:17 +02:00
qemu_process.c qemu: Save domain status ASAP after creating qemu process 2011-07-14 16:10:17 +02:00
qemu_process.h Implement code to attach to external QEMU instances. 2011-07-12 15:39:04 +01:00
qemu.conf qemu: update configuration file 2011-07-12 07:24:43 -06:00
test_libvirtd_qemu.aug Integrate the QEMU driver with the lock manager infrastructure 2011-06-02 10:54:01 +01:00
THREADS.txt qemu: Allow all query commands to be run during long jobs 2011-07-13 01:53:21 +02:00