On Tue, 2005-09-20 at 18:22, Vitaliy Margolen wrote:
Tuesday, September 20, 2005, 6:11:49 PM, Michael Ost wrote:
Should I put my code in CDROM_DeviceIoControl? Or handle it in NtDeviceIoControlFile? Should I pass all other IoControlCodes except IOCTL_DISK_DRIVE_GET_GEOMETRY for a verifiable IDE drive on to the CDROM_... function?
I don't it make any sense to create the whole new file to parse just one IOCTL. So you might just add it to the cdrom.c I think that might get accepted.
I don't think it was clear that the device in question is not a CDROM, but a hard disk. Are IDE hard disks supposed to be lumped in with CDROMs in the code?
But before you go too far, pleas look at kernel/oldconfig.c. It does some parsing of /proc already. So all you need to do is to find where this information is stored on windows (it has to be somewhere in registry) and add to that. Then you don't need to parse /proc all the time but just read info from the registry. One possible option would be to use IOCTL_SCSI_GET_INQUIRY_DATA to
OK. That's a good idea, except that in the Wine version my company is using there is no oldconfig.c. So for our version I guess I would patch dlls/ntdll/cdrom.c by reading out of proc directly. But I would submit a version that stores disk geometry in the registry. I'll look in to that. Thanks for the feedback... mo
"Michael" == Michael Ost most@museresearch.com writes:
Michael> On Tue, 2005-09-20 at 18:22, Vitaliy Margolen wrote: >> Tuesday, September 20, 2005, 6:11:49 PM, Michael Ost wrote: > Should >> I put my code in CDROM_DeviceIoControl? Or handle it in > >> NtDeviceIoControlFile? Should I pass all other IoControlCodes except >> > IOCTL_DISK_DRIVE_GET_GEOMETRY for a verifiable IDE drive on to the >> > CDROM_... function? I don't it make any sense to create the whole >> new file to parse just one IOCTL. So you might just add it to the >> cdrom.c I think that might get accepted.
Michael> I don't think it was clear that the device in question is not a Michael> CDROM, but a hard disk. Are IDE hard disks supposed to be Michael> lumped in with CDROMs in the code?
Our IOCTL handling is a mess.
I had a patch that splitted out IOCTL code handling to separate, loadable dlls, but the patch went by unnoticed. Look for Mail from around July 10 "Uniform SYS/VXD Handling x/6" In your case, when you did CreateFile("\c:"), in file.c it would be noticed that a raw handle on the disk is needed and something like "disk.sys" would be loaded, where you would implement the needed IOCTL. ...
Bye
On Wed, 2005-09-21 at 00:57, Uwe Bonnes wrote:
Our IOCTL handling is a mess.
Seems like it has only been needed and implemented for CDs, so far.
I had a patch that splitted out IOCTL code handling to separate, loadable dlls, but the patch went by unnoticed. Look for Mail from around July 10 "Uniform SYS/VXD Handling x/6" In your case, when you did CreateFile("\c:"), in file.c it would be noticed that a raw handle on the disk is needed and something like "disk.sys" would be loaded, where you would implement the needed IOCTL.
That sounds great. I wonder why it didn't go through...? But that's a bit too much heavy lifting of the wine goblet for me to undertake!
- mo