On Sat, Jan 1, 2011 at 2:22 AM, James McKenzie <span dir="ltr">&lt;<a href="mailto:jjmckenzie51@earthlink.net">jjmckenzie51@earthlink.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 12/31/10 1:50 PM, Charles Davis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 12/31/10 1:11 PM, Ken Thomases wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I should add that this patch seem correct to me. �It couldn&#39;t hurt to get Charles Davis&#39;s input, of course.<br>
</blockquote>
I agree, for now. He should at least put a comment in to the effect of<br>
&quot;if we got this far, there&#39;s already media in the drive.&quot;<br>
</blockquote></div>
That was the point I was trying to get to. �Based on Ken&#39;s comment below, the device is temporary and only exists for the time period that the device is in use.<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
MSDN documents that the purpose of IOCTL_*_CHECK_VERIFY is to check if the media has changed. �The Linux and FreeBSD implementations basically just check if there&#39;s media in the drive. �On Mac OS X, the BSD device file just plain doesn&#39;t exist unless and until there&#39;s media mounted. �There&#39;s no permanent BSD device file for the drive itself. �So, if CDROM_Verify() is called, which requires that the BSD device file is opened and thus is present, that by itself implies that there&#39;s media in the drive. �Therefore, CDROM_Verify() should just return success.<br>

</blockquote>
Makes sense. But the &#39;right&#39; way to implement this on Mac OS is to ask<br>
DiskArbitration to tell us when the media changes. (In fact, the right<br>
way to implement this elsewhere is to ask udev or hald the same thing.)<br>
Then we can return STATUS_VERIFY_REQUIRED (as documented) when the media<br>
actually has changed. For now, though, Lo�c&#39;s patch is OK.<br>
</blockquote></div>
Is this going to be changed sometime in the future to work per the documentation?<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
AJ wants to eventually move some (all?) of the disk/CD/DVD/storage<br>
IOCTLs into mountmgr anyway, where Wine&#39;s fake storage drivers are<br>
hosted. Mountmgr already has infrastructure in place to talk to DA on<br>
Mac OS and to hald on Linux/FreeBSD, so doing this the &#39;right&#39; way will<br>
be much easier there.<br>
</blockquote></div>
This is a good point. �Maybe the effort should be to move the code over to mountmgr.sys rather than implement and have to move it later.<br>
<br>
And I am aware what the process is, I was asking general questions based on what the comments were in the patch. �Basically, the comments did not make sense to me and I was asking for clarification. �That was provided by both Ken and Charles&#39; comments.<br>
<font color="#888888">
<br>
James McKenzie<br>
<br>
<br>
<br>
</font></blockquote></div><br><div>Hello Mr.McKenzie and Wine community,<div><br></div><div>Happy new years.</div><div><br></div><div>In fact, I don&#39;t try to resolve the SCSI command ioctl, to support the cd-rom,</div>
<div>I have just modified the CDROM_Verify(), because I thought, this function</div><div>verify if the media is present in the device.</div><div><br></div><div>Here my reasoning :</div><div><br></div><div>in dll/ntdll/cdrom.c, we are in the function CDROM_DeviceIoControl().</div>
<div><br></div><div>get_parent_device() is called to get the device and�Wine try to open the device.</div><div><br></div><div>For what I understood, �Mac Os will create an entry object into the I/O Registry,</div><div>who represent our device,�(the device exist at boot time or when it is plugged).</div>
<div><br></div><div>get_parent_device() will find the object, and store the name of device.</div><div><br></div><div>After the device is found, Wine try to open it.</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; ">In the case of IOCTL_*_CHECK_VERIFY request, CDROM_Verify is called, In this function, we already know we have a valid device,</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; ">in use, but if the device is present, the media is present too, we can not have a file descriptor to a device, without</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; ">media present.</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; "><br>
</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; ">merci</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; "><br>
</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; ">Lo�c</span>�</div></div>