Replacing "magic numbers" in the Peripheral Type check with defines for the reserved range from IndustryStandard/Scsi.h
Cc: Michael D Kinney <[email protected]> Cc: Jiewen Yao <[email protected]> Cc: Jian J Wang <[email protected]> Cc: Liming Gao <[email protected]> Signed-off-by: Christopher J Zurcher <[email protected]> --- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index c4069aec0f..1caffd38cd 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -2,7 +2,7 @@ SCSI Bus driver that layers on every SCSI Pass Thru and Extended SCSI Pass Thru protocol in the system. -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -1368,7 +1368,8 @@ DiscoverScsiDevice ( goto Done; } - if (0x1e >= InquiryData->Peripheral_Type && InquiryData->Peripheral_Type >= 0xa) { + if ((InquiryData->Peripheral_Type >= EFI_SCSI_TYPE_RESERVED_LOW) && + (InquiryData->Peripheral_Type <= EFI_SCSI_TYPE_RESERVED_HIGH)) { ScsiDeviceFound = FALSE; goto Done; } -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46240): https://edk2.groups.io/g/devel/message/46240 Mute This Topic: https://groups.io/mt/32994944/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
