diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-15 07:48:11 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-15 07:48:11 +0000 |
commit | c9325700d0ef25eaf45077928af3f93b15ac5fe0 (patch) | |
tree | c46ae68c26db3a5a6a9e58b37b53265aa2f770d3 /MdeModulePkg/Bus/Scsi | |
parent | f6b4e53dfe43c27d448cedb57059e5b7ca236dd8 (diff) | |
download | edk2-c9325700d0ef25eaf45077928af3f93b15ac5fe0.zip edk2-c9325700d0ef25eaf45077928af3f93b15ac5fe0.tar.gz edk2-c9325700d0ef25eaf45077928af3f93b15ac5fe0.tar.bz2 |
Refine soma code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Scsi')
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 3e510a6..e6d9636 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -1165,7 +1165,7 @@ DiscoverScsiDevice ( // Using Inquiry command to scan for the device
//
InquiryDataLength = sizeof (EFI_SCSI_INQUIRY_DATA);
- SenseDataLength = sizeof (EFI_SCSI_SENSE_DATA);
+ SenseDataLength = (UINT8) sizeof (EFI_SCSI_SENSE_DATA);
Status = ScsiInquiryCommand (
&ScsiIoDevice->ScsiIo,
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index 72c9f9d..c1d96b9 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -1429,7 +1429,7 @@ ScsiDiskRequestSenseKeys ( UINT8 TargetStatus;
FallStatus = EFI_SUCCESS;
- SenseDataLength = sizeof (EFI_SCSI_SENSE_DATA);
+ SenseDataLength = (UINT8) sizeof (EFI_SCSI_SENSE_DATA);
ZeroMem (
ScsiDiskDevice->SenseData,
@@ -2694,7 +2694,7 @@ AtapiIdentifyDevice ( Cdb[0] = ATA_CMD_IDENTIFY_DEVICE;
CommandPacket.Timeout = EFI_TIMER_PERIOD_SECONDS (1);
CommandPacket.Cdb = Cdb;
- CommandPacket.CdbLength = sizeof (Cdb);
+ CommandPacket.CdbLength = (UINT8) sizeof (Cdb);
CommandPacket.InDataBuffer = &ScsiDiskDevice->IdentifyData;
CommandPacket.InTransferLength = sizeof (ScsiDiskDevice->IdentifyData);
|