[usb] enable listing of non USB card readers

* Also fix the VID:PID population of USB card readers
* Also improve enumeration debugging
* Also add an unofficial cheat mode to list non USB *REMOVABLE* drives
* Closes #693
This commit is contained in:
Pete Batard 2016-02-16 17:47:07 +00:00
parent 58755c1bc4
commit f88faf1a4f
6 changed files with 248 additions and 100 deletions

View file

@ -395,10 +395,10 @@ static BOOL _GetDriveLettersAndType(DWORD DriveIndex, char* drive_letters, UINT*
continue;
}
/* IOCTL_STORAGE_GET_DEVICE_NUMBER's STORAGE_DEVICE_NUMBER.DeviceNumber is
not unique! An HDD, a DVD and probably other drives can have the same
value there => Use GetDriveType() to filter out unwanted devices.
See https://github.com/pbatard/rufus/issues/32 for details. */
// IOCTL_STORAGE_GET_DEVICE_NUMBER's STORAGE_DEVICE_NUMBER.DeviceNumber is
// not unique! An HDD, a DVD and probably other drives can have the same
// value there => Use GetDriveType() to filter out unwanted devices.
// See https://github.com/pbatard/rufus/issues/32#issuecomment-3785956
_drive_type = GetDriveTypeA(drive);
if ((_drive_type != DRIVE_REMOVABLE) && (_drive_type != DRIVE_FIXED))