qemu: Add flag to force a CDROM eject

QEMU allows forcing a CDROM eject even if the guest has locked the device.
Expose this via a new UpdateDevice flag, VIR_DOMAIN_DEVICE_MODIFY_FORCE.

This has been requested for RHEV:

https://bugzilla.redhat.com/show_bug.cgi?id=626305

v2: Change flag name, bool cleanups
This commit is contained in:
Cole Robinson
2010-11-08 12:52:48 -05:00
parent f970d802ab
commit 96d52fcf43
8 changed files with 29 additions and 19 deletions

View File

@@ -1033,6 +1033,8 @@ typedef enum {
VIR_DOMAIN_DEVICE_MODIFY_CURRENT = 0, /* Modify device allocation based on current domain state */
VIR_DOMAIN_DEVICE_MODIFY_LIVE = (1 << 0), /* Modify live device allocation */
VIR_DOMAIN_DEVICE_MODIFY_CONFIG = (1 << 1), /* Modify persisted device allocation */
VIR_DOMAIN_DEVICE_MODIFY_FORCE = (1 << 2), /* Forcibly modify device
(ex. force eject a cdrom) */
} virDomainDeviceModifyFlags;
int virDomainAttachDevice(virDomainPtr domain, const char *xml);