[Top][All Lists]

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

Re: [Qemu-block] CDROM Eject behaviour

From: Markus Armbruster
Subject: Re: [Qemu-block] CDROM Eject behaviour
Date: Sat, 14 Mar 2015 11:26:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Peter Lieven <address@hidden> writes:

> Hi,
> I just stumbled across an old ticket where a user complains that an
> ejected CD is visible again after a reset.
> It seems that the behaviour of qemu changed somewhen in the past
> (maybe years ago). I wonder
> which behaviour would be correct or better.
> If we eject a CD with the eject command via qmp or hmp we open the
> tray *AND* remove the media.
> If the OS ejects a CD we just open the tray. So if the ATAPI or SCSI
> CDROM is resetted the tray is closed
> and the CD is there again.
> Its like we should behave like a tray CDROM or a slot-in CDROM.
> A CD installer usually ejects the media after it has finished. Some
> ask to remove the media and press a key
> some not.
> Whats your opinion?

I think you got the answers you wanted already.  Let me add something
that bears repeating: the monitor commands are the virtual equivalents
to what a (human) user can do to his physical CD-ROM device: press
buttons, insert medium, take out medium, etc.  They are *not* another
way to run the guest's /bin/eject without having to log in.  With that
in mind, things become a bit clearer.

The "eject" button doesn't really eject, it asks the device to eject.
If the OS has locked a medium in place, the device doesn't actually
comply!  Instead, it notifies the OS of the button press.

The trouble with the traditional monitor commands is that they do
multiple things, some of them weird.  For instance, "eject" (without -f)
isn't like "press the button", it's

    if there is a medium locked into the device
        notify OS
    else if there is a medium
        teleport it out of the device without moving the tray

"change" is worse.

Max's work will hopefully provide us a set of clean monitor commands
mirroring the elementary physical actions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]