MdeModulePkg/UsbMass: Merge UsbBoot(Read|Write)Blocks(16)

The change doesn't have functionality impact.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Ruiyu Ni
2018-09-11 18:08:02 +08:00
parent 76d1c03cbd
commit e59db6a732
3 changed files with 80 additions and 252 deletions

View File

@@ -172,9 +172,9 @@ UsbMassReadBlocks (
}
if (UsbMass->Cdb16Byte) {
Status = UsbBootReadBlocks16 (UsbMass, Lba, TotalBlock, Buffer);
Status = UsbBootReadWriteBlocks16 (UsbMass, FALSE, Lba, TotalBlock, Buffer);
} else {
Status = UsbBootReadBlocks (UsbMass, (UINT32) Lba, TotalBlock, Buffer);
Status = UsbBootReadWriteBlocks (UsbMass, FALSE, (UINT32) Lba, TotalBlock, Buffer);
}
if (EFI_ERROR (Status)) {
@@ -292,9 +292,9 @@ UsbMassWriteBlocks (
// and clear the status should the write succeed.
//
if (UsbMass->Cdb16Byte) {
Status = UsbBootWriteBlocks16 (UsbMass, Lba, TotalBlock, Buffer);
Status = UsbBootReadWriteBlocks16 (UsbMass, TRUE, Lba, TotalBlock, Buffer);
} else {
Status = UsbBootWriteBlocks (UsbMass, (UINT32) Lba, TotalBlock, Buffer);
Status = UsbBootReadWriteBlocks (UsbMass, TRUE, (UINT32) Lba, TotalBlock, Buffer);
}
if (EFI_ERROR (Status)) {