RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted

2006-12-03 Thread Yu, Xiaoyang
Yes raw_close() will be triggered when issue eject CD-ROM command in guest 
OS.  Thanks a lot for your help. Much appreciated. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lonnie Mendez
Sent: 2006年12月1日 17:01
To: qemu-devel@nongnu.org
Subject: RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted

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).


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted

2006-12-01 Thread Yu, Xiaoyang
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!

Thanks
Xiaoyang

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lonnie Mendez
Sent: 2006年11月30日 15:08
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted

On Thu, 2006-11-30 at 15:03 +0800, Yu, Xiaoyang wrote:
 Hi guys,
 
  
 
 I am using QEMU with Xen and Intel VT, and I have a question about
 detecting the CD-ROM disk unmount event: When user ejects CD-ROM in
 the guest domain, how can QEMU detect this event?
 
  
 
 I know if we use “info block” command before and after a CD-ROM disk
 is ejected, we can see the difference. But I want to add code to
 handle the CD-ROM unmount event, so I need to know which source file I
 should take a look. It seems to be not “monitor.c”. Any comment will
 be appreciated. Thanks in advance!

hw/ide.c, block.c:bdrv_eject()




___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted

2006-12-01 Thread Lonnie Mendez
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).



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted

2006-11-29 Thread Lonnie Mendez
On Thu, 2006-11-30 at 15:03 +0800, Yu, Xiaoyang wrote:
 Hi guys,
 
  
 
 I am using QEMU with Xen and Intel VT, and I have a question about
 detecting the CD-ROM disk unmount event: When user ejects CD-ROM in
 the guest domain, how can QEMU detect this event?
 
  
 
 I know if we use “info block” command before and after a CD-ROM disk
 is ejected, we can see the difference. But I want to add code to
 handle the CD-ROM unmount event, so I need to know which source file I
 should take a look. It seems to be not “monitor.c”. Any comment will
 be appreciated. Thanks in advance!

hw/ide.c, block.c:bdrv_eject()



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel