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

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



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 redhat com>
> ---
>  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.

Regards,
Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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