Re: [PATCH] qemu: Add flag to force a CDROM eject

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/08/2010 01:22 PM, Daniel P. Berrange wrote:
> On Mon, Nov 08, 2010 at 01:07:27PM -0500, Cole Robinson wrote:
>> QEMU allows forcing a CDROM eject even if the guest has locked the device.
>> Expose this via a new UpdateDevice flag, VIR_DOMAIN_DEVICE_EJECT_FORCE.
>>
>> This has been requested for RHEV:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=626305
>>
>> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
>> ---
>>  include/libvirt/libvirt.h.in |    1 +
>>  src/qemu/qemu_driver.c       |   14 +++++++++-----
>>  src/qemu/qemu_monitor.c      |    9 +++++----
>>  src/qemu/qemu_monitor.h      |    6 ++----
>>  src/qemu/qemu_monitor_json.c |    5 +++--
>>  src/qemu/qemu_monitor_json.h |    3 ++-
>>  src/qemu/qemu_monitor_text.c |    5 +++--
>>  src/qemu/qemu_monitor_text.h |    3 ++-
>>  8 files changed, 27 insertions(+), 19 deletions(-)
>>
>> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
>> index 81db3a2..83cbb57 100644
>> --- a/include/libvirt/libvirt.h.in
>> +++ b/include/libvirt/libvirt.h.in
>> @@ -1033,6 +1033,7 @@ 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_EJECT_FORCE = (1 << 2), /* Forcibly eject media */
>>  } virDomainDeviceModifyFlags;
> 
> I think we should call this  DEVICE_MODIFY_FORCE, since these
> APIs are used for more than just ejecting media & other things
> it does could be forced too.
> 

Okay, resent with this and Eric's recommended changes.

- Cole

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]