Alexandre Julliard wrote:
Charles Davis cdavis@mymail.mines.edu writes:
Oh, I see. You mean I should open a handle to mountmgr with NtOpenFile(). That's what I thought. Now I just need to figure out the right IOCTL. Maybe I need to make one up. And I still don't know how to specify the correct device to mountmgr. (The answer is "depends on the IOCTL," so I need to answer the first question before I can answer this one.)
There's no new ioctl here, just an open. That is essentially supported already.
Another thing I don't quite understand: what good would an FD from the mountmgr device do? I looked at mountmgr, and I don't see any code for handing out FDs. No open()s, no sendmsg()s, no nothing. The only function I see in ntdll for this is server_get_unix_fd(), which is what we use to get the device FD from the NT CD-ROM device handle, and again I don't see how that will help. I mean, it's probably something like a socket or a pipe so all we can do is read and write it. (With sockets, we have some system IOCTLs, but they're all for controlling the socket itself.) And that's if there even is one. I looked at wineserver, and it looks like some file objects don't have to have real FDs behind them. Or did you have a different FD in mind, one I haven't thought of?
There's no mechanism for this at the moment, that's why I said some infrastructure is needed. mountmgr should be asked to open the unix device corresponding to the NT device, and that fd should get back to the app somehow.
Oh, OK, I see what you're getting at. (Can't believe I didn't see it sooner...) I open mountmgr, then I ask it for the unix FD for the parent of the partition, corresponding to the NT device. You want me to move the process of getting the parent FD to mountmgr.
But then I have to get the FD back from mountmgr. For that, we need a UNIX domain socket. Mountmgr needs to know about it so it can send the FD using a control message (the way wineserver and ntdll exchange FDs).
But I still don't see how that allows me to find out the SCSI address of a CD-ROM drive.
Chip