]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update Shell hot fix patch to integrate a fix to solve "CHAR8" compatibility issue...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Sep 2008 05:10:55 +0000 (05:10 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Sep 2008 05:10:55 +0000 (05:10 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5783 6f19259b-4bc3-4df7-8a09-765794883524

EdkShellPkg/ReadMe.txt
EdkShellPkg/ShellHotFix.patch

index f36eb3dc43d16691b345f2abaa98d2c8b389ea98..55e97fda26577b97905095fabf7f12a3df545f8d 100644 (file)
@@ -5,7 +5,7 @@ This is EDK style package:
    Currently version (r30) corresponds to EDK Shell 1.05 official release.
 3. The ShellHotFix.patch file solves the follow two issues in EDK Shell 1.05 release:
    a. RFC3066 language compatibility issue in drivers command
-   b. "CHAR8" compatibility issue in DmpStore command
+   b. "CHAR8" compatibility issue in DmpStore, Edit command and shell script execution
    This patch will be integrated into the later official release.
 4. The EDK II style DSC file is used to validate build EDK Shell source & EDK compatibility package and can generate the binaries in EdkShellBinPkg.
    To use this file, execute the following command under workspace to build EDK Shell source:
index fb05c754d481d5e30e3f9a5932a1a3dc17dc0d1c..46a95d884120d62a16a6ea87a4e2624f8467c6b3 100644 (file)
@@ -163,6 +163,28 @@ Index: drivers/drivers.c
    ShellCloseHandleEnumerator ();
    LibCheckVarFreeVarList (&ChkPck);
    LibUnInitializeStrings ();
+Index: edit/libFileBuffer.c\r
+===================================================================\r
+--- edit/libFileBuffer.c       (revision 30)\r
++++ edit/libFileBuffer.c       (working copy)\r
+@@ -735,7 +735,7 @@\r
+   UINTN                           LineSize;
+   VOID                            *Buffer;
+   CHAR16                          *UnicodeBuffer;
+-  CHAR8                           *AsciiBuffer;
++  UINT8                           *AsciiBuffer;
+   UINTN                           FileSize;
+   EFI_FILE_HANDLE                 Handle;
+   BOOLEAN                         CreateFile;
+@@ -1047,7 +1047,7 @@\r
+       //
+       // Unicode file
+       //
+-      if (AsciiBuffer[0] == 0xff && AsciiBuffer[1] == 0xfe) {
++      if ((FileSize >= 2) && (*((UINT16 *) Buffer) == EFI_UNICODE_BYTE_ORDER_MARK)) {
+         //
+         // Unicode file's size should be even
+         //
 Index: Library/EfiShellLib.h\r
 ===================================================================\r
 --- Library/EfiShellLib.h      (revision 30)\r
@@ -315,6 +337,43 @@ Index: Library/Misc.c
 +
 +
 +
+Index: shellenv/batch.c\r
+===================================================================\r
+--- shellenv/batch.c   (revision 30)\r
++++ shellenv/batch.c   (working copy)\r
+@@ -2074,17 +2074,17 @@\r
+ --*/
+ {
+   //
+-  // UNICODE byte-order-mark is two bytes
++  // UNICODE byte-order-mark is 16 bits
+   //
+-  CHAR8       Buffer8[2];
++  UINT16      Uint16;
+   UINTN       BufSize;
+   EFI_STATUS  Status;
+   //
+   //  Read the first two bytes to check for byte order mark
+   //
+-  BufSize = sizeof (Buffer8);
+-  Status  = File->Read (File, &BufSize, Buffer8);
++  BufSize = sizeof (Uint16);
++  Status  = File->Read (File, &BufSize, &Uint16);
+   if (EFI_ERROR (Status)) {
+     return Status;
+   }
+@@ -2098,9 +2098,8 @@\r
+   //  otherwise assume it is ASCII.  UNICODE byte order mark on
+   //  IA little endian is first byte 0xff and second byte 0xfe
+   //
+-  if ((Buffer8[0] | (Buffer8[1] << 8)) == EFI_UNICODE_BYTE_ORDER_MARK) {
++  if ((BufSize == 2) && (Uint16 == EFI_UNICODE_BYTE_ORDER_MARK)) {
+     *IsAscii = FALSE;
+-
+   } else {
+     *IsAscii = TRUE;
+   }
 Index: SmbiosView/PrintInfo.c\r
 ===================================================================\r
 --- SmbiosView/PrintInfo.c     (revision 30)\r