diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-21 03:26:42 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-21 03:26:42 +0000 |
commit | 3e0c79b57baca799c3d46f429d6e70b1a5ac2113 (patch) | |
tree | 3b3e94244025257ab7a9e4c110f063db1a0b1fdd /MdePkg/Library/UefiScsiLib | |
parent | 7b2cc5499f4398565308b1b7f8bf56ff56a6f965 (diff) | |
download | edk2-platforms-3e0c79b57baca799c3d46f429d6e70b1a5ac2113.tar.xz |
Fix ScsiLib build break by << operator, which is replaced by LShiftU64 of BaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8363 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiScsiLib')
-rw-r--r-- | MdePkg/Library/UefiScsiLib/UefiScsiLib.c | 15 | ||||
-rw-r--r-- | MdePkg/Library/UefiScsiLib/UefiScsiLib.inf | 1 |
2 files changed, 9 insertions, 7 deletions
diff --git a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c index 12af1338d3..8fcc3d157d 100644 --- a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c +++ b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c @@ -14,6 +14,7 @@ #include <Uefi.h>
+#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiScsiLib.h>
#include <Library/BaseMemoryLib.h>
@@ -143,7 +144,7 @@ ScsiTestUnitReadyCommand ( ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
Cdb[0] = EFI_SCSI_OP_TEST_UNIT_READY;
- Cdb[1] = (UINT8) ((Lun << 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
+ Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
CommandPacket.CdbLength = (UINT8) EFI_SCSI_OP_LENGTH_SIX;
CommandPacket.SenseDataLength = *SenseDataLength;
@@ -276,7 +277,7 @@ ScsiInquiryCommand ( ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
Cdb[0] = EFI_SCSI_OP_INQUIRY;
- Cdb[1] = (UINT8) ((Lun << 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
+ Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
if (EnableVitalProductData) {
Cdb[1] |= 0x01;
}
@@ -428,7 +429,7 @@ ScsiModeSense10Command ( //
// DBDField is in Cdb[1] bit3 of (bit7..0)
//
- Cdb[1] = (UINT8) (((Lun << 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK) + ((DBDField << 3) & 0x08));
+ Cdb[1] = (UINT8) ((LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK) + ((DBDField << 3) & 0x08));
//
// PageControl is in Cdb[2] bit7..6, PageCode is in Cdb[2] bit5..0
//
@@ -516,7 +517,7 @@ ScsiRequestSenseCommand ( ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
Cdb[0] = EFI_SCSI_OP_REQUEST_SENSE;
- Cdb[1] = (UINT8) ((Lun << 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
+ Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
Cdb[4] = (UINT8) (*SenseDataLength);
CommandPacket.CdbLength = (UINT8) EFI_SCSI_OP_LENGTH_SIX;
@@ -610,7 +611,7 @@ ScsiReadCapacityCommand ( ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
Cdb[0] = EFI_SCSI_OP_READ_CAPACITY;
- Cdb[1] = (UINT8) ((Lun << 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
+ Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
if (!Pmi) {
//
// Partial medium indicator,if Pmi is FALSE, the Cdb.2 ~ Cdb.5 MUST BE ZERO.
@@ -812,7 +813,7 @@ ScsiRead10Command ( ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
Cdb[0] = EFI_SCSI_OP_READ10;
- Cdb[1] = (UINT8) ((Lun << 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
+ Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
Cdb[2] = (UINT8) (StartLba >> 24);
Cdb[3] = (UINT8) (StartLba >> 16);
Cdb[4] = (UINT8) (StartLba >> 8);
@@ -914,7 +915,7 @@ ScsiWrite10Command ( ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
Cdb[0] = EFI_SCSI_OP_WRITE10;
- Cdb[1] = (UINT8) ((Lun << 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
+ Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
Cdb[2] = (UINT8) (StartLba >> 24);
Cdb[3] = (UINT8) (StartLba >> 16);
Cdb[4] = (UINT8) (StartLba >> 8);
diff --git a/MdePkg/Library/UefiScsiLib/UefiScsiLib.inf b/MdePkg/Library/UefiScsiLib/UefiScsiLib.inf index d2af7919e9..6fc69b308a 100644 --- a/MdePkg/Library/UefiScsiLib/UefiScsiLib.inf +++ b/MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -40,4 +40,5 @@ [LibraryClasses]
BaseMemoryLib
DebugLib
+ BaseLib
|