Received: from eggs.gnu.org ([2001:4830:134:3::10]:43907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VotQz-0007Ln-TL for qemu-devel@nongnu.org; Fri, 06 Dec 2013 06:19:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VotQt-0006we-6x for qemu-devel@nongnu.org; Fri, 06 Dec 2013 06:19:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VotQs-0006wO-Tf for qemu-devel@nongnu.org; Fri, 06 Dec 2013 06:18:55 -0500 From: Markus Armbruster References: <1386132925-16728-1-git-send-email-aik@ozlabs.ru> <1386132925-16728-2-git-send-email-aik@ozlabs.ru> <529EEE9F.50007@redhat.com> <87d2ldklji.fsf@blackfin.pond.sub.org> <878uvzo501.fsf@blackfin.pond.sub.org> <52A074C6.30103@ozlabs.ru> <52A07644.7000602@redhat.com> Date: Fri, 06 Dec 2013 12:18:51 +0100 In-Reply-To: <52A07644.7000602@redhat.com> (Paolo Bonzini's message of "Thu, 05 Dec 2013 13:49:08 +0100") Message-ID: <87wqjii5wk.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 1/3] scsi-disk: close drive on START_STOP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Alexey Kardashevskiy , qemu-devel@nongnu.org Paolo Bonzini writes: > Il 05/12/2013 13:42, Alexey Kardashevskiy ha scritto: >> Thanks! >> >> Just out of curiosity. A lot (in fact, all around me) dvd drives do not >> support trayclose as they are in laptops or servers (which use the same >> laptop models). I cannot even verify how this "eject -t" exactly works - no >> hardware around me. And even if I could find it, I could easily take the >> disc off the tray in that short period of time between tray is open and >> tray is closed but we still absolutely want "eject" + "eject -t" to work as >> you described. > > Taking the disc off the tray is equivalent to going to the monitor and > doing "eject -f cd". Actually, monitor command "eject -f" is like poking the little button hidden in that little hole with an unbent paperclip or something, which makes the drive eject whether the OS likes it or not (and tends to make the OS rather upset), then removing the medium. Monitor command "eject" without -f is like pushing the "normal" button, and if that ejects, and the medium wasn't locked, removing the medium. Yes, that's not exactly elegant semantics. /usr/bin/eject is something else entirely: it sends commands to the device. Such commands can make the drive eject and load, but they cannot cause the medium removal without further user action. Exactly the same on real and virtual systems. > I.e. programmatic actions leave the disc in (at least if you do not > consider laptops and servers; but the guest can detect whether the tray > can be auto-closed, and we tell it that it can). Out-of-band user > actions force the disc out. > >> Why exactly? :) Only because change of behavior is bad? Just asking. Thanks. > > The only practical use of CDs is installation, and it took a looooong > time to get it to work with all sorts of guests. Indeed.