Received: from eggs.gnu.org ([140.186.70.92]:42132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTZuC-0005ei-3I for qemu-devel@nongnu.org; Mon, 06 Jun 2011 09:31:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTZu7-000880-Hl for qemu-devel@nongnu.org; Mon, 06 Jun 2011 09:31:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTZu7-00087v-5G for qemu-devel@nongnu.org; Mon, 06 Jun 2011 09:31:39 -0400 From: Markus Armbruster References: <1307127842-12102-1-git-send-email-lcapitulino@redhat.com> Date: Mon, 06 Jun 2011 15:31:35 +0200 In-Reply-To: <1307127842-12102-1-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Fri, 3 Jun 2011 16:03:52 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kwolf@redhat.com, amit.shah@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org Luiz Capitulino 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. * Media control: blockdev-media to change media. Tray must be open, may or may not contain media. Arguments specify new media, or no media.