Any suggestions for a good "wineish" way to implement an IOCTL_ call for an IDE disk?
My winelib app is hosting a Windows DLL that is making an IOCTL_DISK_DRIVE_GET_GEOMETRY call on an IDE hard disk. ntdll/file.c NtDeviceIoControlFile is passing this off to ntdll/cdrom.c CDROM_DeviceIoControl and, of course, since it is not a cdrom disk, that fails.
I have some code that reads geometry information out of /proc/ide/hd?/geometry that is working fine. But I am not sure how to integrate it into ntdll.
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?
If anyone has a background in this code, you probably have an idea straight off how best to fit it in.
Thanks for any help. Patch against wine-20050419 is attached for illustrative purposes. ... mo