From: Luiz Capitulino <lcapitulino@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: kwolf@redhat.com, amit.shah@redhat.com, aliguori@us.ibm.com,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands
Date: Mon, 6 Jun 2011 11:56:48 -0300 [thread overview]
Message-ID: <20110606115648.5f188d2a@doriath> (raw)
In-Reply-To: <m362oj6q88.fsf@blackfin.pond.sub.org>
On Mon, 06 Jun 2011 15:31:35 +0200
Markus Armbruster <armbru@redhat.com> wrote:
> Luiz Capitulino <lcapitulino@redhat.com> 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.
next prev parent reply other threads:[~2011-06-06 14:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 19:03 [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands Luiz Capitulino
2011-06-03 19:03 ` [Qemu-devel] [RFC 01/10] block: bdrv_eject(): Add 'force' parameter Luiz Capitulino
2011-06-03 19:03 ` [Qemu-devel] [RFC 02/10] block: Rename bdrv_mon_event() Luiz Capitulino
2011-06-03 19:03 ` [Qemu-devel] [RFC 03/10] QMP: query-block: Add the 'tray-open' key Luiz Capitulino
2011-06-03 19:03 ` [Qemu-devel] [RFC 04/10] HMP: info block: Print " Luiz Capitulino
2011-06-06 13:19 ` Markus Armbruster
2011-06-06 14:46 ` Luiz Capitulino
2011-06-03 19:03 ` [Qemu-devel] [RFC 05/10] QMP: Introduce the blockdev-tray-open command Luiz Capitulino
2011-06-06 11:40 ` Amit Shah
2011-06-06 14:38 ` Luiz Capitulino
2011-06-07 13:29 ` Amit Shah
2011-06-07 13:53 ` Luiz Capitulino
2011-06-06 13:35 ` Markus Armbruster
2011-06-03 19:03 ` [Qemu-devel] [RFC 06/10] QMP: Introduce the blockdev-tray-close command Luiz Capitulino
2011-06-03 19:03 ` [Qemu-devel] [RFC 07/10] QMP: Introduce the blockdev-media-insert command Luiz Capitulino
2011-06-06 11:44 ` Amit Shah
2011-06-06 13:40 ` Markus Armbruster
2011-06-06 14:58 ` Luiz Capitulino
2011-06-03 19:04 ` [Qemu-devel] [RFC 08/10] QMP: Introduce the BLOCK_TRAY_OPEN and BLOCK_TRAY_CLOSE events Luiz Capitulino
2011-06-03 19:04 ` [Qemu-devel] [RFC 09/10] QMP/HMP: eject: Use blockdev-tray-open Luiz Capitulino
2011-06-03 19:04 ` [Qemu-devel] [RFC 10/10] QMP/HMP: change: Use QMP tray commands Luiz Capitulino
2011-06-06 11:48 ` Amit Shah
2011-06-06 14:45 ` Luiz Capitulino
2011-06-07 13:32 ` Amit Shah
2011-06-06 13:31 ` [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands Markus Armbruster
2011-06-06 14:56 ` Luiz Capitulino [this message]
2011-12-20 6:49 ` Osier Yang
2012-01-03 19:28 ` Luiz Capitulino
2012-01-11 7:34 ` Osier Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110606115648.5f188d2a@doriath \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.