summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorEugene Cohen <eugene@hp.com>2013-08-08 22:31:54 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2013-08-08 22:31:54 +0000
commit433a21cba1a6a825b9ec07f580164b84e5d41d3a (patch)
treed53403e105836f991d4add0659cfdc15d9f8b85e /ShellPkg
parent373fbc64167e080fbe334776877cfba116d62a2d (diff)
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
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c4
-rw-r--r--ShellPkg/Library/UefiShellLevel3CommandsLib/Type.c4
-rw-r--r--ShellPkg/ShellPkg.dec2
3 files changed, 5 insertions, 5 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
index 80d2dd02b..05f384496 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);
}
diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Type.c b/ShellPkg/Library/UefiShellLevel3CommandsLib/Type.c
index 3e4ccb36e..50974c3fb 100644
--- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Type.c
+++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Type.c
@@ -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)){
diff --git a/ShellPkg/ShellPkg.dec b/ShellPkg/ShellPkg.dec
index 4a29f4afb..3a2bef637 100644
--- a/ShellPkg/ShellPkg.dec
+++ b/ShellPkg/ShellPkg.dec
@@ -103,7 +103,7 @@
gEfiShellPkgTokenSpaceGuid.PcdShellMapNameLength|50|UINT8|0x00000009
## This determins how many bytes are read out of files at a time for file operations (type, copy, etc...)
- gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|1000|UINT16|0x0000000A
+ gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|1000|UINT32|0x0000000A
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
## This flag is used to control the protocols produced by the shell