From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpd8l-0002tD-Uq for qemu-devel@nongnu.org; Fri, 23 Oct 2015 10:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zpd8k-00087o-VC for qemu-devel@nongnu.org; Fri, 23 Oct 2015 10:16:19 -0400 Date: Fri, 23 Oct 2015 16:16:09 +0200 From: Kevin Wolf Message-ID: <20151023141609.GJ3797@noname.redhat.com> References: <1445270025-22999-1-git-send-email-mreitz@redhat.com> <1445270025-22999-35-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445270025-22999-35-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v7 34/39] block: Inquire tray state before tray-moved events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Alberto Garcia , qemu-block@nongnu.org, John Snow , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi Am 19.10.2015 um 17:53 hat Max Reitz geschrieben: > blk_dev_change_media_cb() is called for all potential tray movements; > however, it is possible to request closing the tray but nothing actually > happening (on a floppy disk drive without a medium). > > Thus, the actual tray status should be inquired before sending a > tray-moved event (and an event should be sent whenever the status > changed). > > Checking @load is now superfluous; it was necessary because it was > possible to change a medium without having explicitly opened the tray > and closed it again (or it might have been possible, at least). This is > no longer possible, though. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf