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
DestVolumeInfo = NULL;\r
ShellStatus = SHELL_SUCCESS;\r
\r
- ReadSize = PcdGet16(PcdShellFileOperationSize);\r
+ ReadSize = PcdGet32(PcdShellFileOperationSize);\r
// Why bother copying a file to itself\r
if (StrCmp(Source, Dest) == 0) {\r
return (SHELL_SUCCESS);\r
//\r
Buffer = AllocateZeroPool(ReadSize);\r
ASSERT(Buffer != NULL);\r
- while (ReadSize == PcdGet16(PcdShellFileOperationSize) && !EFI_ERROR(Status)) {\r
+ while (ReadSize == PcdGet32(PcdShellFileOperationSize) && !EFI_ERROR(Status)) {\r
Status = ShellReadFile(SourceHandle, &ReadSize, Buffer);\r
Status = ShellWriteFile(DestHandle, &ReadSize, Buffer);\r
}\r
UINTN LoopVar;\r
CHAR16 AsciiChar;\r
\r
- ReadSize = PcdGet16(PcdShellFileOperationSize);\r
+ ReadSize = PcdGet32(PcdShellFileOperationSize);\r
Buffer = AllocateZeroPool(ReadSize);\r
if (Buffer == NULL) {\r
return (EFI_OUT_OF_RESOURCES);\r
Status = ShellSetFilePosition(Handle, 0);\r
ASSERT_EFI_ERROR(Status);\r
\r
- while (ReadSize == ((UINTN)PcdGet16(PcdShellFileOperationSize))){\r
+ while (ReadSize == ((UINTN)PcdGet32(PcdShellFileOperationSize))){\r
ZeroMem(Buffer, ReadSize);\r
Status = ShellReadFile(Handle, &ReadSize, Buffer);\r
if (EFI_ERROR(Status)){\r
gEfiShellPkgTokenSpaceGuid.PcdShellMapNameLength|50|UINT8|0x00000009\r
\r
## This determins how many bytes are read out of files at a time for file operations (type, copy, etc...)\r
- gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|1000|UINT16|0x0000000A\r
+ gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|1000|UINT32|0x0000000A\r
\r
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]\r
## This flag is used to control the protocols produced by the shell\r