Charles Davis wrote: > Alexandre Julliard wrote: >> Charles Davis <[email protected]> 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. Or, maybe not. I could be totally wrong about that. Maybe what you really want is for me to get an FD from mountmgr so I can talk to it at will. I don't know.
We can even add the FD to mountmgr's run loop (via a CFFileDescriptor object), or if you prefer, we can do the traditional select() or poll() loop. (But why spawn another thread just for that?)
