]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg\Application\Shell: Clean start row information after the console has been...
authorQiu Shumin <shumin.qiu@intel.com>
Tue, 9 Jun 2015 02:29:37 +0000 (02:29 +0000)
committershenshushi <shenshushi@Edk2>
Tue, 9 Jun 2015 02:29:37 +0000 (02:29 +0000)
OriginalStartRow and CurrentStartRow should be initialized after new mode is set.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Signed-off-by: Eric Jin <eric.jin@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17584 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/ConsoleLogger.c

index 75469d9b061f29ec61c35d9c10dfad3541ce9063..06f96866718c86de5f4512f24ed651c494d14c4a 100644 (file)
@@ -2,7 +2,7 @@
   Provides interface to shell console logger.\r
 \r
   (C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -410,6 +410,10 @@ ConsoleLoggerReset (
   //\r
   if (!EFI_ERROR (Status)) {\r
     ConsoleLoggerResetBuffers(ConsoleInfo);\r
+    if (ExtendedVerification == TRUE) {\r
+      ConsoleInfo->OriginalStartRow = 0;\r
+      ConsoleInfo->CurrentStartRow = 0;\r
+    }\r
   }\r
 \r
   return Status;\r
@@ -963,10 +967,13 @@ ConsoleLoggerSetMode (
   // Check that the buffers are still correct for logging\r
   //\r
   if (!EFI_ERROR (Status)) {\r
-    ConsoleInfo->OurConOut.Mode = gST->ConOut->Mode;\r
+    ConsoleInfo->OurConOut.Mode = ConsoleInfo->OldConOut->Mode;\r
     ConsoleLoggerResetBuffers(ConsoleInfo);\r
+    ConsoleInfo->OriginalStartRow = 0;\r
+    ConsoleInfo->CurrentStartRow = 0;\r
+    ConsoleInfo->OurConOut.ClearScreen (&ConsoleInfo->OurConOut);\r
   }\r
-\r
+   \r
   return Status;\r
 }\r
 \r