From 433a21cba1a6a825b9ec07f580164b84e5d41d3a Mon Sep 17 00:00:00 2001 From: Eugene Cohen Date: Thu, 8 Aug 2013 22:31:54 +0000 Subject: 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 reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14534 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib') diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c index 80d2dd02bc..05f3844966 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c @@ -89,7 +89,7 @@ CopySingleFile( DestVolumeInfo = NULL; ShellStatus = SHELL_SUCCESS; - ReadSize = PcdGet16(PcdShellFileOperationSize); + ReadSize = PcdGet32(PcdShellFileOperationSize); // Why bother copying a file to itself if (StrCmp(Source, Dest) == 0) { return (SHELL_SUCCESS); @@ -233,7 +233,7 @@ CopySingleFile( // Buffer = AllocateZeroPool(ReadSize); ASSERT(Buffer != NULL); - while (ReadSize == PcdGet16(PcdShellFileOperationSize) && !EFI_ERROR(Status)) { + while (ReadSize == PcdGet32(PcdShellFileOperationSize) && !EFI_ERROR(Status)) { Status = ShellReadFile(SourceHandle, &ReadSize, Buffer); Status = ShellWriteFile(DestHandle, &ReadSize, Buffer); } -- cgit v1.2.3