]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Fix error code when attaching existing device
authorJiri Denemark <jdenemar@redhat.com>
Tue, 4 Dec 2012 09:20:30 +0000 (10:20 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 5 Dec 2012 12:45:34 +0000 (13:45 +0100)
commit935550c6d35518371a97f94a1cf57081e02403e1
tree1c9300a6818f3c280afd226732ce8cf65dbe6ccd
parent2edbd3d918bfdbc5e0054002867f25725080abe9
qemu: Fix error code when attaching existing device

An attempt to attach device that is already attached to a domain results
in the following error:

virsh # attach-device rhel6 pci2 --persistent
error: Failed to attach device from pci2
error: invalid argument: device is already in the domain configuration

The "invalid argument" error code looks wrong, we usually use "operation
invalid" when the action cannot be done in current state.
src/qemu/qemu_driver.c