]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: increase available size for PcdShellFileOperationSize
authorEugene Cohen <eugene@hp.com>
Thu, 8 Aug 2013 22:31:54 +0000 (22:31 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 Aug 2013 22:31:54 +0000 (22:31 +0000)
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

ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
ShellPkg/Library/UefiShellLevel3CommandsLib/Type.c
ShellPkg/ShellPkg.dec

index 80d2dd02bc733b952f2c6c03b64fbced9bd6b410..05f3844966a68315dd8644289a1b21c8add865c6 100644 (file)
@@ -89,7 +89,7 @@ CopySingleFile(
   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
@@ -233,7 +233,7 @@ CopySingleFile(
         //\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
index 3e4ccb36e34c7cae73984e3e204e846267e13c68..50974c3fb9499534ba2d100a70bcd525e934fd47 100644 (file)
@@ -42,7 +42,7 @@ TypeFileByHandle (
   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
@@ -51,7 +51,7 @@ TypeFileByHandle (
   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
index 4a29f4afbc70526cf519bb67a02133e3bfebc370..3a2bef6370787f1860db00586f7aeda18eb9b5c0 100644 (file)
   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