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/Usb/UsbMassStorageDxe | |
parent | f6b4e53dfe43c27d448cedb57059e5b7ca236dd8 (diff) | |
download | edk2-platforms-c9325700d0ef25eaf45077928af3f93b15ac5fe0.tar.xz |
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/Usb/UsbMassStorageDxe')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c index 70d27468d5..72a53f1fc8 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c @@ -50,7 +50,7 @@ UsbBootRequestSense ( SenseCmd.OpCode = USB_BOOT_REQUEST_SENSE_OPCODE;
SenseCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
- SenseCmd.AllocLen = sizeof (USB_BOOT_REQUEST_SENSE_DATA);
+ SenseCmd.AllocLen = (UINT8) sizeof (USB_BOOT_REQUEST_SENSE_DATA);
Status = Transport->ExecCommand (
UsbMass->Context,
@@ -289,7 +289,7 @@ UsbBootIsUnitReady ( return UsbBootExecCmdWithRetry (
UsbMass,
&TestCmd,
- sizeof (USB_BOOT_TEST_UNIT_READY_CMD),
+ (UINT8) sizeof (USB_BOOT_TEST_UNIT_READY_CMD),
EfiUsbNoData,
NULL,
0,
@@ -325,12 +325,12 @@ UsbBootInquiry ( InquiryCmd.OpCode = USB_BOOT_INQUIRY_OPCODE;
InquiryCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
- InquiryCmd.AllocLen = sizeof (InquiryData);
+ InquiryCmd.AllocLen = (UINT8) sizeof (InquiryData);
Status = UsbBootExecCmdWithRetry (
UsbMass,
&InquiryCmd,
- sizeof (USB_BOOT_INQUIRY_CMD),
+ (UINT8) sizeof (USB_BOOT_INQUIRY_CMD),
EfiUsbDataIn,
&InquiryData,
sizeof (USB_BOOT_INQUIRY_DATA),
@@ -392,7 +392,7 @@ UsbBootReadCapacity ( Status = UsbBootExecCmdWithRetry (
UsbMass,
&CapacityCmd,
- sizeof (USB_BOOT_READ_CAPACITY_CMD),
+ (UINT8) sizeof (USB_BOOT_READ_CAPACITY_CMD),
EfiUsbDataIn,
&CapacityData,
sizeof (USB_BOOT_READ_CAPACITY_DATA),
@@ -460,7 +460,7 @@ UsbScsiModeSense ( Status = UsbBootExecCmdWithRetry (
UsbMass,
&ModeSenseCmd,
- sizeof (USB_SCSI_MODE_SENSE6_CMD),
+ (UINT8) sizeof (USB_SCSI_MODE_SENSE6_CMD),
EfiUsbDataIn,
&ModeParaHeader,
sizeof (USB_SCSI_MODE_SENSE6_PARA_HEADER),
@@ -704,7 +704,7 @@ UsbBootReadBlocks ( Status = UsbBootExecCmdWithRetry (
UsbMass,
&ReadCmd,
- sizeof (USB_BOOT_READ10_CMD),
+ (UINT8) sizeof (USB_BOOT_READ10_CMD),
EfiUsbDataIn,
Buffer,
ByteSize,
@@ -780,7 +780,7 @@ UsbBootWriteBlocks ( Status = UsbBootExecCmdWithRetry (
UsbMass,
&WriteCmd,
- sizeof (USB_BOOT_WRITE10_CMD),
+ (UINT8) sizeof (USB_BOOT_WRITE10_CMD),
EfiUsbDataOut,
Buffer,
ByteSize,
|