The attached patch adds code to xend_internal.c:xenDomainAttachDevice
that checks to see if the device mentioned in the passed-in XML already
exists, and if so calls op_device_configure to modify the device. It is
particularly useful for connecting and disconnecting a hardware cdrom
device to an FV guest.
I considered making new API a la virDomainModifyDevice, but decided
overloading virDomainAttachDevice was cleaner (and didn't change
existing API).
I have tested the patch on f7 with xen 3.1 and a windows 2000 guest.
Since the patch merely wraps Xen's device_configure call, we're not
adding much risk of breakage.
Please ACK.
Take care,
--Hugh
--
Red Hat Virtualization Group
http://redhat.com/virtualization
Hugh Brock | virt-manager
http://virt-manager.org
hbrock(a)redhat.com | virtualization library
http://libvirt.org