]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Three GUIDs had been retired, PrimaryConsoleInDeviceGuid, PrimaryConsoleOutDeviceGuid...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 10 Mar 2009 03:36:33 +0000 (03:36 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 10 Mar 2009 03:36:33 +0000 (03:36 +0000)
Reconnect, Edit, HexEdit command are updated.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7842 6f19259b-4bc3-4df7-8a09-765794883524

21 files changed:
EdkShellBinPkg/Bin/Ia32/Apps/edit.efi
EdkShellBinPkg/Bin/Ia32/Apps/hexedit.efi
EdkShellBinPkg/Bin/Ia32/Shell.efi
EdkShellBinPkg/Bin/Ia32/Shell_Full.efi
EdkShellBinPkg/Bin/Ipf/Apps/edit.efi
EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efi
EdkShellBinPkg/Bin/Ipf/Shell.efi
EdkShellBinPkg/Bin/Ipf/Shell_Full.efi
EdkShellBinPkg/Bin/X64/Apps/edit.efi
EdkShellBinPkg/Bin/X64/Apps/hexedit.efi
EdkShellBinPkg/Bin/X64/Shell.efi
EdkShellBinPkg/Bin/X64/Shell_full.efi
EdkShellBinPkg/FullShell/Ia32/Shell_Full.efi
EdkShellBinPkg/FullShell/Ipf/Shell_Full.efi
EdkShellBinPkg/FullShell/X64/Shell_full.efi
EdkShellBinPkg/MinimumShell/Ia32/Shell.efi
EdkShellBinPkg/MinimumShell/Ipf/Shell.efi
EdkShellBinPkg/MinimumShell/X64/Shell.efi
EdkShellPkg/EdkShellPkg.dsc
EdkShellPkg/ReadMe.txt
EdkShellPkg/ShellHotFix.patch

index e1e55a6fdc7cc074cf88c3a67fca5e85fc6c9a03..212a064aa68f9813b5deb1472375f334e4ea1bcf 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ia32/Apps/edit.efi and b/EdkShellBinPkg/Bin/Ia32/Apps/edit.efi differ
index b348df83e204063c3c92a386e4f40d900672c7da..4808b9789fe873c9300266ceaec2b634c03e515b 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ia32/Apps/hexedit.efi and b/EdkShellBinPkg/Bin/Ia32/Apps/hexedit.efi differ
index a38afc11fe6fcf613eee30bbdac0e40b0aa60e55..ccb2b5b4492040e9ac48c1bf052dd847a6bb9b58 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ia32/Shell.efi and b/EdkShellBinPkg/Bin/Ia32/Shell.efi differ
index fb5ab1eee774f24f1ceffafc08a1c84dca344f7f..a0806b7ffdf7e99d65541654a1558aaf6909b739 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ia32/Shell_Full.efi and b/EdkShellBinPkg/Bin/Ia32/Shell_Full.efi differ
index 9bb4d190ef568b6d9c43fe2269e3cd166b59c558..fd01a252289fad563a92b1acf51cd7febcbc441b 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ipf/Apps/edit.efi and b/EdkShellBinPkg/Bin/Ipf/Apps/edit.efi differ
index 4406a4d65e008548b29bf024c68fe14a574da022..6e7e23ad4761851104d55235c8e58a9e67a9447b 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efi and b/EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efi differ
index fc1d75153596e0dd88d5b1913f6f52a790d61c85..c38e3e9f9881274296a1a6e6115237aa8c87fb5b 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ipf/Shell.efi and b/EdkShellBinPkg/Bin/Ipf/Shell.efi differ
index 62c50bb6e8e1056d197ca861ebc75d34dc1bcfc4..cda6840187f064dc203e65894bb45cf14d36897d 100644 (file)
Binary files a/EdkShellBinPkg/Bin/Ipf/Shell_Full.efi and b/EdkShellBinPkg/Bin/Ipf/Shell_Full.efi differ
index 9c37f41ea3a6a9d59f117523fb2d888a31994462..b90e30b073cf8d79e10ea1b3ce0791136a4302c3 100644 (file)
Binary files a/EdkShellBinPkg/Bin/X64/Apps/edit.efi and b/EdkShellBinPkg/Bin/X64/Apps/edit.efi differ
index 3fb59af1295421b9f7e4c9267e37f99b4fbca65f..7170d6de4398388f75a7d67aea504f3483e60aad 100644 (file)
Binary files a/EdkShellBinPkg/Bin/X64/Apps/hexedit.efi and b/EdkShellBinPkg/Bin/X64/Apps/hexedit.efi differ
index 1174584dee88a08007bdfe00605872ce93c4c677..afbf5b18f49940eb7daad08e247a686d9501b51b 100644 (file)
Binary files a/EdkShellBinPkg/Bin/X64/Shell.efi and b/EdkShellBinPkg/Bin/X64/Shell.efi differ
index d525497029c2e01ee8b58eb6bb5e984cef6ac419..79fbe05c507f9c82cdeb41bb1e311511a140bb58 100644 (file)
Binary files a/EdkShellBinPkg/Bin/X64/Shell_full.efi and b/EdkShellBinPkg/Bin/X64/Shell_full.efi differ
index fb5ab1eee774f24f1ceffafc08a1c84dca344f7f..a0806b7ffdf7e99d65541654a1558aaf6909b739 100644 (file)
Binary files a/EdkShellBinPkg/FullShell/Ia32/Shell_Full.efi and b/EdkShellBinPkg/FullShell/Ia32/Shell_Full.efi differ
index 62c50bb6e8e1056d197ca861ebc75d34dc1bcfc4..cda6840187f064dc203e65894bb45cf14d36897d 100644 (file)
Binary files a/EdkShellBinPkg/FullShell/Ipf/Shell_Full.efi and b/EdkShellBinPkg/FullShell/Ipf/Shell_Full.efi differ
index d525497029c2e01ee8b58eb6bb5e984cef6ac419..79fbe05c507f9c82cdeb41bb1e311511a140bb58 100644 (file)
Binary files a/EdkShellBinPkg/FullShell/X64/Shell_full.efi and b/EdkShellBinPkg/FullShell/X64/Shell_full.efi differ
index a38afc11fe6fcf613eee30bbdac0e40b0aa60e55..ccb2b5b4492040e9ac48c1bf052dd847a6bb9b58 100644 (file)
Binary files a/EdkShellBinPkg/MinimumShell/Ia32/Shell.efi and b/EdkShellBinPkg/MinimumShell/Ia32/Shell.efi differ
index fc1d75153596e0dd88d5b1913f6f52a790d61c85..c38e3e9f9881274296a1a6e6115237aa8c87fb5b 100644 (file)
Binary files a/EdkShellBinPkg/MinimumShell/Ipf/Shell.efi and b/EdkShellBinPkg/MinimumShell/Ipf/Shell.efi differ
index 1174584dee88a08007bdfe00605872ce93c4c677..afbf5b18f49940eb7daad08e247a686d9501b51b 100644 (file)
Binary files a/EdkShellBinPkg/MinimumShell/X64/Shell.efi and b/EdkShellBinPkg/MinimumShell/X64/Shell.efi differ
index 3311f5fd1e8ce1ae0d8682b2fd0922c72956632c..dd1ce2f637fa3666f233a42df916a2ac8c9ffe8a 100644 (file)
@@ -28,7 +28,7 @@
 # Change the macro to the directory containing the source code from EDK Shell Project.  \r
 # This is a workspace relative directory\r
 #  \r
 # Change the macro to the directory containing the source code from EDK Shell Project.  \r
 # This is a workspace relative directory\r
 #  \r
-DEFINE EDK_SHELL_DIR             = Shell\r
+DEFINE EDK_SHELL_DIR             = EdkShellPkg/Shell\r
 \r
 [Libraries]\r
   #\r
 \r
 [Libraries]\r
   #\r
index d11bb8a5521c62c198d5613f28677379756db811..5dfb125bd75a65497f4e7783a936901be1ed3c9d 100644 (file)
@@ -13,6 +13,9 @@ This is EDK style package and the following steps can help to build the package:
 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, Edit command and shell script execution. 
 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, Edit command and shell script execution. 
+   c. Three GUIDs had been retired, PrimaryConsoleInDeviceGuid, PrimaryConsoleOutDeviceGuid and PrimaryStandardErrorDeviceGuid.
+      Reconnect, Edit, HexEdit command are updated.
+   
    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.
    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.
index 46a95d884120d62a16a6ea87a4e2624f8467c6b3..e4aa54bb78d1aa5411952763067e41e1bcf9bfdf 100644 (file)
@@ -163,6 +163,70 @@ Index: drivers/drivers.c
    ShellCloseHandleEnumerator ();
    LibCheckVarFreeVarList (&ChkPck);
    LibUnInitializeStrings ();
    ShellCloseHandleEnumerator ();
    LibCheckVarFreeVarList (&ChkPck);
    LibUnInitializeStrings ();
+Index: edit/libEditor.c\r
+===================================================================\r
+--- edit/libEditor.c   (revision 30)\r
++++ edit/libEditor.c   (working copy)\r
+@@ -88,8 +88,6 @@\r
+   )\r
+ {\r
+   EFI_STATUS  Status;\r
+-  EFI_HANDLE  *HandleBuffer;\r
+-  UINTN       HandleCount;\r
\r
+   //\r
+   // basic initialization\r
+@@ -117,38 +115,22 @@\r
+         );\r
\r
+   //\r
+-  // Find mouse\r
++  // Find mouse in System Table ConsoleInHandle\r
+   //\r
+-  HandleBuffer = NULL;\r
+-  Status = LibLocateHandle (\r
+-            ByProtocol,\r
+-            &gEfiPrimaryConsoleInDeviceGuid,\r
+-            NULL,\r
+-            &HandleCount,\r
+-            &HandleBuffer\r
+-            );\r
++  Status = BS->HandleProtocol (\r
++                In,\r
++                &gEfiSimplePointerProtocolGuid,\r
++                &MainEditor.MouseInterface\r
++                );\r
\r
+-  if (!EFI_ERROR (Status)) {\r
+-    if (HandleCount > 0) {\r
+-      Status = BS->HandleProtocol (\r
+-                    HandleBuffer[0],\r
+-                    &gEfiSimplePointerProtocolGuid,\r
+-                    &MainEditor.MouseInterface\r
+-                    );\r
+-\r
+-      if (EFI_ERROR (Status)) {\r
+-        MainEditor.MouseInterface = NULL;\r
+-      } else {\r
+-        MainEditor.MouseAccumulatorX  = 0;\r
+-        MainEditor.MouseAccumulatorY  = 0;\r
+-        MainEditor.MouseSupported     = TRUE;\r
+-      }\r
+-    }\r
++  if (EFI_ERROR (Status)) {\r
++    MainEditor.MouseInterface = NULL;\r
++  } else {\r
++    MainEditor.MouseAccumulatorX  = 0;\r
++    MainEditor.MouseAccumulatorY  = 0;\r
++    MainEditor.MouseSupported     = TRUE;\r
+   }\r
\r
+-  if (HandleBuffer) {\r
+-    FreePool (HandleBuffer);\r
+-  }\r
+   //\r
+   // below will call the five components' init function\r
+   //\r
 Index: edit/libFileBuffer.c\r
 ===================================================================\r
 --- edit/libFileBuffer.c       (revision 30)\r
 Index: edit/libFileBuffer.c\r
 ===================================================================\r
 --- edit/libFileBuffer.c       (revision 30)\r
@@ -184,7 +248,68 @@ Index: edit/libFileBuffer.c
 +      if ((FileSize >= 2) && (*((UINT16 *) Buffer) == EFI_UNICODE_BYTE_ORDER_MARK)) {
          //
          // Unicode file's size should be even
 +      if ((FileSize >= 2) && (*((UINT16 *) Buffer) == EFI_UNICODE_BYTE_ORDER_MARK)) {
          //
          // Unicode file's size should be even
-         //
+         //\r
+Index: hexedit/libEditor.c\r
+===================================================================\r
+--- hexedit/libEditor.c        (revision 30)\r
++++ hexedit/libEditor.c        (working copy)\r
+@@ -100,8 +100,6 @@\r
+ --*/\r
+ {\r
+   EFI_STATUS  Status;\r
+-  EFI_HANDLE  *HandleBuffer;\r
+-  UINTN       HandleCount;\r
\r
+   //\r
+   // basic initialization\r
+@@ -129,36 +127,19 @@\r
+         &(HMainEditor.ScreenSize.Row)\r
+         );\r
\r
+-  HandleBuffer = NULL;\r
+-  Status = LibLocateHandle (\r
+-            ByProtocol,\r
+-            &gEfiPrimaryConsoleInDeviceGuid,\r
+-            NULL,\r
+-            &HandleCount,\r
+-            &HandleBuffer\r
+-            );\r
+-\r
+-  if (!EFI_ERROR (Status)) {\r
+-\r
+-    if (HandleCount > 0) {\r
+-      Status = BS->HandleProtocol (\r
+-                    HandleBuffer[0],\r
+-                    &gEfiSimplePointerProtocolGuid,\r
+-                    &HMainEditor.MouseInterface\r
+-                    );\r
+-      if (EFI_ERROR (Status)) {\r
+-        HMainEditor.MouseInterface = NULL;\r
+-      } else {\r
+-        HMainEditor.MouseAccumulatorX = 0;\r
+-        HMainEditor.MouseAccumulatorY = 0;\r
+-        HMainEditor.MouseSupported    = TRUE;\r
+-      }\r
+-    }\r
++  Status = BS->HandleProtocol (\r
++                In,\r
++                &gEfiSimplePointerProtocolGuid,\r
++                &HMainEditor.MouseInterface\r
++                );\r
++  if (EFI_ERROR (Status)) {\r
++    HMainEditor.MouseInterface = NULL;\r
++  } else {\r
++    HMainEditor.MouseAccumulatorX = 0;\r
++    HMainEditor.MouseAccumulatorY = 0;\r
++    HMainEditor.MouseSupported    = TRUE;\r
+   }\r
\r
+-  if (HandleBuffer != NULL) {\r
+-    FreePool (HandleBuffer);\r
+-  }\r
+   //\r
+   // below will call the five components' init function\r
+   //
 Index: Library/EfiShellLib.h\r
 ===================================================================\r
 --- Library/EfiShellLib.h      (revision 30)\r
 Index: Library/EfiShellLib.h\r
 ===================================================================\r
 --- Library/EfiShellLib.h      (revision 30)\r
@@ -374,6 +499,176 @@ Index: shellenv/batch.c
    } else {
      *IsAscii = TRUE;
    }
    } else {
      *IsAscii = TRUE;
    }
+Index: shellenv/Connect.c\r
+===================================================================\r
+--- shellenv/Connect.c (revision 30)\r
++++ shellenv/Connect.c (working copy)\r
+@@ -831,6 +831,16 @@\r
+     return Status;\r
+   }\r
\r
++  //\r
++  // Close proxy console before disconnect all devices.\r
++  //\r
++  SEnvCloseConsoleProxy (\r
++    ST->ConsoleInHandle,\r
++    &ST->ConIn,\r
++    ST->ConsoleOutHandle,\r
++    &ST->ConOut\r
++    );\r
++\r
+   for (Index = 0; Index < AllHandleCount; Index++) {\r
+     //\r
+     // Check whether the handle is still in handle database\r
+@@ -1004,7 +1014,6 @@\r
+ VOID\r
+ SEnvConnectConsole (\r
+   CHAR16      *VariableName,\r
+-  EFI_GUID    *PrimaryGuid,\r
+   EFI_GUID    *ConsoleGuid,\r
+   EFI_HANDLE  *ConsoleHandle,\r
+   VOID        **ConsoleInterface\r
+@@ -1018,9 +1027,8 @@\r
+   EFI_HANDLE                *AllHandleBuffer;\r
+   VOID                      *Interface;\r
\r
+-  *ConsoleHandle    = NULL;\r
+-  *ConsoleInterface = NULL;\r
+   ConsoleIndex      = 0;\r
++  AllHandleBuffer   = NULL;\r
\r
+   DevicePath        = LibGetVariable (VariableName, &gEfiGlobalVariableGuid);\r
+   if (DevicePath != NULL) {\r
+@@ -1028,17 +1036,19 @@\r
+     FreePool (DevicePath);\r
+   }\r
\r
+-  AllHandleBuffer = NULL;\r
+-  Status = BS->LocateHandleBuffer (\r
+-                ByProtocol,\r
+-                PrimaryGuid,\r
+-                NULL,\r
+-                &AllHandleCount,\r
+-                &AllHandleBuffer\r
+-                );\r
+-  if (!EFI_ERROR (Status) && AllHandleCount > 0) {\r
+-    *ConsoleHandle = AllHandleBuffer[0];\r
+-  } else if (*ConsoleHandle == NULL) {\r
++  Status = EFI_NOT_FOUND;\r
++  //\r
++  // Check ConsoleHandle validation whatever it was updated or not.\r
++  //\r
++  if (*ConsoleHandle != NULL) {\r
++    Status = BS->HandleProtocol (\r
++                  *ConsoleHandle,\r
++                  ConsoleGuid,\r
++                  &Interface\r
++                  );\r
++  }\r
++\r
++  if (EFI_ERROR (Status)) {\r
+     AllHandleBuffer = NULL;\r
+     Status = BS->LocateHandleBuffer (\r
+                   ByProtocol,\r
+@@ -1063,16 +1073,16 @@\r
+                       &gEfiDevicePathProtocolGuid,\r
+                       &Interface\r
+                       );\r
+-        if (EFI_ERROR (Status)) {\r
++        if (!EFI_ERROR (Status)) {\r
+           ConsoleIndex = Index;\r
+           break;\r
+         }\r
+       }\r
++      \r
++      *ConsoleHandle = AllHandleBuffer[ConsoleIndex];\r
+     }\r
+   }\r
\r
+-  *ConsoleHandle = AllHandleBuffer[ConsoleIndex];\r
+-\r
+   if (*ConsoleHandle != NULL) {\r
+     BS->HandleProtocol (\r
+           *ConsoleHandle,\r
+@@ -1081,7 +1091,7 @@\r
+           );\r
+   }\r
\r
+-  if (AllHandleBuffer) {\r
++  if (AllHandleBuffer != NULL) {\r
+     FreePool (AllHandleBuffer);\r
+   }\r
+ }\r
+@@ -1189,8 +1199,7 @@\r
+   EFI_STATUS  Status;\r
\r
+   //\r
+-  // Check current ConIn and ConOut to ensure it is the ConsoleProxy\r
+-  // Otherwise, the Console should not be close\r
++  // Check current ConIn and ConOut to judge it is the ConsoleProxy\r
+   //\r
+   Status = SEnvCheckConsoleProxy (\r
+             ST->ConsoleInHandle,\r
+@@ -1203,23 +1212,21 @@\r
+   // Indicate the Console is replaced by redirection operation\r
+   // It is not safe to connect Console here\r
+   //\r
+-  if (EFI_ERROR (Status)) {\r
+-    return ;\r
++  if (!EFI_ERROR (Status)) {\r
++    //\r
++    // It is proxy console, to prevent the proxy console form being restored to original console,\r
++    // close it temporary before connect all console\r
++    //\r
++    SEnvCloseConsoleProxy (\r
++      ST->ConsoleInHandle,\r
++      &ST->ConIn,\r
++      ST->ConsoleOutHandle,\r
++      &ST->ConOut\r
++      );\r
+   }\r
+-  //\r
+-  // To prevent the proxy console form being restored to original console,\r
+-  // close it temporary before connect all console\r
+-  //\r
+-  SEnvCloseConsoleProxy (\r
+-    ST->ConsoleInHandle,\r
+-    &ST->ConIn,\r
+-    ST->ConsoleOutHandle,\r
+-    &ST->ConOut\r
+-    );\r
\r
+   SEnvConnectConsole (\r
+     VarErrorOut,\r
+-    &gEfiPrimaryStandardErrorDeviceGuid,\r
+     &gEfiSimpleTextOutProtocolGuid,\r
+     &ST->StandardErrorHandle,\r
+     (VOID **) &ST->StdErr\r
+@@ -1227,7 +1234,6 @@\r
\r
+   SEnvConnectConsole (\r
+     VarConsoleOut,\r
+-    &gEfiPrimaryConsoleOutDeviceGuid,\r
+     &gEfiSimpleTextOutProtocolGuid,\r
+     &ST->ConsoleOutHandle,\r
+     (VOID **) &ST->ConOut\r
+@@ -1235,7 +1241,6 @@\r
\r
+   SEnvConnectConsole (\r
+     VarConsoleIn,\r
+-    &gEfiPrimaryConsoleInDeviceGuid,\r
+     &gEfiSimpleTextInProtocolGuid,\r
+     &ST->ConsoleInHandle,\r
+     (VOID **) &ST->ConIn\r
+@@ -1254,6 +1259,8 @@\r
+   SetCrc (&ST->Hdr);\r
+ }\r
\r
++\r
++\r
+ EFI_STATUS\r
+ EFIAPI\r
+ SEnvCmdReconnect (\r
 Index: SmbiosView/PrintInfo.c\r
 ===================================================================\r
 --- SmbiosView/PrintInfo.c     (revision 30)\r
 Index: SmbiosView/PrintInfo.c\r
 ===================================================================\r
 --- SmbiosView/PrintInfo.c     (revision 30)\r