From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gq4Gj-0004Zs-Md for qemu-devel@nongnu.org; Fri, 01 Dec 2006 04:01:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gq4Gh-0004ZG-Jc for qemu-devel@nongnu.org; Fri, 01 Dec 2006 04:01:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gq4Gh-0004Z9-3w for qemu-devel@nongnu.org; Fri, 01 Dec 2006 04:01:15 -0500 Received: from [24.93.47.44] (helo=ms-smtp-05.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gq4Gg-00056T-Hl for qemu-devel@nongnu.org; Fri, 01 Dec 2006 04:01:14 -0500 Received: from vaio (cpe-66-68-31-100.austin.res.rr.com [66.68.31.100]) by ms-smtp-05.texas.rr.com (8.13.6/8.13.6) with ESMTP id kB191CtJ008394 for ; Fri, 1 Dec 2006 03:01:13 -0600 (CST) Subject: RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted From: Lonnie Mendez In-Reply-To: References: Content-Type: text/plain Date: Fri, 01 Dec 2006 03:01:05 -0600 Message-Id: <1164963666.19394.37.camel@vaio> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Fri, 2006-12-01 at 16:21 +0800, Yu, Xiaoyang wrote: > Great! Thanks a lot for the information! I found the function definition in the files you pointed out, by looking into the latest CVS snapshot. > > It seems that code changed a lot since version 0.8.2 released. So if I still use version 0.8.2, is there some files or function I should look at instead? Thanks a lot! I found this just by searching for 'eject' in the source. It does look like qemu from cvs has nicely refactored the code for dealing with removable media since the qemu 0.8.2 release. Follow the path of the bdrv_close handler (for cdrom raw_close() is called). The call is made from hw/ide.c (GPCMD_START_STOP_UNIT).