ShellPkg: increase available size for PcdShellFileOperationSize
Some storage subsystems benefit by having shell file operation sizes (affecting copy and type commands right now) larger than 2^16. This patch changes the PcdShellFileOperationSize type to 32-bits. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14534 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -42,7 +42,7 @@ TypeFileByHandle (
|
||||
UINTN LoopVar;
|
||||
CHAR16 AsciiChar;
|
||||
|
||||
ReadSize = PcdGet16(PcdShellFileOperationSize);
|
||||
ReadSize = PcdGet32(PcdShellFileOperationSize);
|
||||
Buffer = AllocateZeroPool(ReadSize);
|
||||
if (Buffer == NULL) {
|
||||
return (EFI_OUT_OF_RESOURCES);
|
||||
@@ -51,7 +51,7 @@ TypeFileByHandle (
|
||||
Status = ShellSetFilePosition(Handle, 0);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
while (ReadSize == ((UINTN)PcdGet16(PcdShellFileOperationSize))){
|
||||
while (ReadSize == ((UINTN)PcdGet32(PcdShellFileOperationSize))){
|
||||
ZeroMem(Buffer, ReadSize);
|
||||
Status = ShellReadFile(Handle, &ReadSize, Buffer);
|
||||
if (EFI_ERROR(Status)){
|
||||
|
Reference in New Issue
Block a user