On Tue, 20 Dec 2011 14:49:47 +0800 Osier Yang <jy...@redhat.com> wrote:
> On 2011年06月04日 03:03, Luiz Capitulino wrote: > > In a recent discussion on the mailing list regarding the introduction of > > the BLOCK_TRAY_OPEN and BLOCK_TRAY_CLOSE events[1], it was mentioned that > > we need to fix the eject command and maybe introduce new commands first. > > > > Here's a my proposal. > > > > This series introduces three new commands: > > > > o blockdev-tray-open: opens the drive tray. Also Supports removing the > > inserted > > media. The BLOCK_TRAY_OPEN event is emitted if this command succeeds. > > o blockdev-tray-close: closes a drive tray. The BLOCK_TRAY_CLOSE event is > > emitted. > > o blockdev-media-insert: Inserts a media in the tray. The tray must empty > > and already opened. No event is emitted. > > > > The existing 'eject' and 'change' commands are completely rewriten in terms > > of the new commands. Besides fixing some bad behaviors, this also makes it > > possible for the events to be automtically emitted. > > > > Ejecting a device inside the guest (or closing its tray) also causes the > > events to be emitted. > > > > Everything which applies for the virtual tray seems to work as expected for > > the host's tray. But more testing is needed. > > > > Hi, Luiz > > Does it still plan to introduce new commands for tray & media > management? Yes, but I'm not exactly sure when. Do you need it? > and by the way, I'd agree with Markus more for > seperating the commands for tray and media management. It > makes thing simpler and more clear from a user's point of > view. > > Regards, > Osier >