Alexandre Julliard wrote:
Charles Davis cdavis@mymail.mines.edu writes:
Charles Davis wrote:
Alexandre Julliard wrote:
That sort of thing should most likely be integrated with the diskarbitration stuff in mountmgr.
Really? I guess I could do it that way. But then how are IOCTL_SCSI_GET_ADDRESS clients supposed to get the address?
With an ioctl to mountmgr.
Right. Silly me.
There is a bit of infrastructure work to do first to assign the correct device to the file descriptor.
Now I just need to figure out how to do that. I read the headers and source, and figured out a QUERY_UNIX_DRIVE won't work because it needs a drive letter, and NTDLL isn't supposed to know about drive letters. Maybe we can use the device name by doing something similar to get_parent_device(). But that only works on Mac OS. If we do this for Linux, too, we'll have to figure something else out. Maybe if we fstat() the FD and get its device number, we can use it to find the file system corresponding to it. Something like that could work on Mac OS, too, and there's similar code elsewhere in Wine (in ntdll itself, if I'm not mistaken). Maybe I could even hijack that code for this purpose instead of reinventing the wheel.
We might need to define a new mountmgr IOCTL to get the address--or will an existing IOCTL do? In any case, we'll then have to implement whatever IOCTL gets chosen in mountmgr.
Do you want the Linux implementation moved over to mountmgr, too, or is it fine the way it is?