https://git.reactos.org/?p=reactos.git;a=commitdiff;h=38be848f68cff71200a0f…
commit 38be848f68cff71200a0fb57d7674a0401994e69
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Feb 10 22:33:43 2019 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Feb 10 22:40:59 2019 +0100
[USBSTOR][USBSTOR_NEW] Fix a comparison made for assigning the
ScsiInquiryData->RemovableMedia flag.
Now removable drives are really reported as such.
See
https://github.com/reactos/reactos/pull/308/files#r163224294
for more details.
---
drivers/usb/usbstor/disk.c | 2 +-
drivers/usb/usbstor_new/disk.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/usbstor/disk.c b/drivers/usb/usbstor/disk.c
index 604f621c91..7dc4438cdc 100644
--- a/drivers/usb/usbstor/disk.c
+++ b/drivers/usb/usbstor/disk.c
@@ -649,7 +649,7 @@ USBSTOR_HandleDeviceControl(
ScsiInquiryData->DeviceTypeQualifier = (UFIInquiryResponse->RMB &
0x7F);
/* Hack for IoReadPartitionTable call in disk.sys */
- ScsiInquiryData->RemovableMedia = ((ScsiInquiryData->DeviceType !=
DIRECT_ACCESS_DEVICE) ? ((UFIInquiryResponse->RMB & 0x80) ? 1 : 0) : 0);
+ ScsiInquiryData->RemovableMedia = ((ScsiInquiryData->DeviceType ==
DIRECT_ACCESS_DEVICE) ? ((UFIInquiryResponse->RMB & 0x80) ? 1 : 0) : 0);
ScsiInquiryData->Versions = 0x04;
ScsiInquiryData->ResponseDataFormat = 0x02;
diff --git a/drivers/usb/usbstor_new/disk.c b/drivers/usb/usbstor_new/disk.c
index 604f621c91..7dc4438cdc 100644
--- a/drivers/usb/usbstor_new/disk.c
+++ b/drivers/usb/usbstor_new/disk.c
@@ -649,7 +649,7 @@ USBSTOR_HandleDeviceControl(
ScsiInquiryData->DeviceTypeQualifier = (UFIInquiryResponse->RMB &
0x7F);
/* Hack for IoReadPartitionTable call in disk.sys */
- ScsiInquiryData->RemovableMedia = ((ScsiInquiryData->DeviceType !=
DIRECT_ACCESS_DEVICE) ? ((UFIInquiryResponse->RMB & 0x80) ? 1 : 0) : 0);
+ ScsiInquiryData->RemovableMedia = ((ScsiInquiryData->DeviceType ==
DIRECT_ACCESS_DEVICE) ? ((UFIInquiryResponse->RMB & 0x80) ? 1 : 0) : 0);
ScsiInquiryData->Versions = 0x04;
ScsiInquiryData->ResponseDataFormat = 0x02;