-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get device instance for empty CD drive on Windows #20
Comments
Huh, that's surprising. This is failing on the initial device open, which means we're going to need to handle CD drives differently on Windows. I don't have any physical hardware with a CD drive anymore, if anyone wants to take a crack at it. |
@RibShark Is this CD drive connected via USB? |
Yes, it is. |
@RibShark refer to https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#win32-device-namespaces I prefer to use a Win32 device namespace instead of the Win32 file namespace, and smartie could detect and return it with function get_all_device. In my test, the CdRom device is not an empty CD drive and could be opened, but the ATA or SCSi commands should be incompatible with CdRom device type.
|
I've tested on both Windows 10 and 11, enumeration picked up both empty and in-use CD-ROM drives without issue. Something else going on here, might be related to the USB bridge (which smartmontools also has issues with) |
@TkTech Maybe something different between your device and me. |
When attempting to run get_device on Windows with an empty CD drive, the CreateFileA call returns a "device not ready" error:
A drive shouldn't need to have media inserted in order to send/receive SCSI commands.
The text was updated successfully, but these errors were encountered: