From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyMQB-0006ze-Im for qemu-devel@nongnu.org; Fri, 17 Feb 2012 06:56:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyMQ4-0003hF-LA for qemu-devel@nongnu.org; Fri, 17 Feb 2012 06:56:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyMQ4-0003h7-Br for qemu-devel@nongnu.org; Fri, 17 Feb 2012 06:56:08 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1HBu7fA022546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 Feb 2012 06:56:07 -0500 Date: Fri, 17 Feb 2012 09:56:07 -0200 From: Luiz Capitulino Message-ID: <20120217095607.24dbcd58@doriath.home> In-Reply-To: References: <1329331347-11232-1-git-send-email-lcapitulino@redhat.com> <1329331347-11232-5-git-send-email-lcapitulino@redhat.com> <20120216111447.2160fa63@doriath.home> <4F3D054C.9020603@redhat.com> <4F3E239C.6050402@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] qmp: add BLOCK_MEDIUM_EJECT event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , pbonzini@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org On Fri, 17 Feb 2012 12:44:28 +0100 Markus Armbruster wrote: > >> I figure Luiz's patch works. But maybe it could be simplified some by > >> replacing bdrv_dev_change_media_cb() by a "open/close tray" callback > >> that returns whether it moved. bdrv_dev_change_media_cb() would then > >> simply open the tray, emit event if it moved, close the tray, emit event > >> if it moved. > > > > Yes, I had the same impression after reading the first few paragraphs of > > your analysis (which looks right to me). > > If I understand Luiz correctly, he'd like to do that in a follow-up > patch. Yes, but as I said I'm not completely sure what's the best thing to do here, and this may take some time, but I'll do it.