[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands |
Date: |
Mon, 6 Jun 2011 11:56:48 -0300 |
On Mon, 06 Jun 2011 15:31:35 +0200
Markus Armbruster <address@hidden> wrote:
> Luiz Capitulino <address@hidden> writes:
>
> > 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.
>
> Conflates tray control with media control. Hmm.
>
> > 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.
>
> What about separating tray control and media control like this:
>
> * Tray control: either blockdev-tray-open and blockdev-tray-close, or a
> single blockdev-tray with a boolean argument.
This might sound like a simple thing, but sometimes I'm really undecided when
something should be a new argument or a new command.
Following Anthony's idea that it can be helpful to think in a C interface,
I slightly prefer this:
blockdev_tray_open(device);
...
blockdev_tray_close(device);
Than this:
blockdev_tray(device, TRAY_OPEN);
...
blockdev_tray(device, TRAY_CLOSE);
> * Media control: blockdev-media to change media. Tray must be open, may
> or may not contain media. Arguments specify new media, or no media.
Yeah, maybe it's better to drop the 'remove' flag from the open command.
But then I think I prefer having blockdev-media-remove and
blockdev-media-insert instead of a single blockdev-media command.
- Re: [Qemu-devel] [RFC 05/10] QMP: Introduce the blockdev-tray-open command, (continued)
Re: [Qemu-devel] [RFC 05/10] QMP: Introduce the blockdev-tray-open command, Markus Armbruster, 2011/06/06
[Qemu-devel] [RFC 08/10] QMP: Introduce the BLOCK_TRAY_OPEN and BLOCK_TRAY_CLOSE events, Luiz Capitulino, 2011/06/03
[Qemu-devel] [RFC 09/10] QMP/HMP: eject: Use blockdev-tray-open, Luiz Capitulino, 2011/06/03
[Qemu-devel] [RFC 10/10] QMP/HMP: change: Use QMP tray commands, Luiz Capitulino, 2011/06/03
Re: [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands, Markus Armbruster, 2011/06/06
- Re: [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands,
Luiz Capitulino <=