]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c
ShellPkg: remove superfluous TimerLib resolution
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel3CommandsLib / Ver.c
index 765a6a3abac5734e75c89815745fefb43b679992..d0e2b5cb24268dd47cbe499f93ac9f232be4ad70 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
   Main file for Ver shell level 3 function.\r
 \r
-  Copyright (c) 2013, Hewlett-Packard Development Company, L.P.\r
+  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
+  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2009 - 2010, 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
@@ -63,7 +64,7 @@ ShellCommandRunVer (
   Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);\r
   if (EFI_ERROR(Status)) {\r
     if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, ProblemParam);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"ver", ProblemParam);  \r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -80,19 +81,24 @@ ShellCommandRunVer (
       //\r
       // we have too many parameters\r
       //\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"ver");  \r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
       if (ShellCommandLineGetFlag(Package, L"-s")) {\r
-        ShellPrintHiiEx (\r
-          0,\r
-          gST->ConOut->Mode->CursorRow,\r
-          NULL,\r
-          STRING_TOKEN (STR_VER_OUTPUT_SIMPLE),\r
-          gShellLevel3HiiHandle,\r
-          gEfiShellProtocol->MajorVersion,\r
-          gEfiShellProtocol->MinorVersion\r
-         );\r
+        if (ShellCommandLineGetFlag(Package, L"-terse") || ShellCommandLineGetFlag(Package, L"-t")){\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellLevel3HiiHandle, L"ver", L"-t or -terse", L"-s");\r
+          ShellStatus = SHELL_INVALID_PARAMETER;\r
+        } else {\r
+          ShellPrintHiiEx (\r
+            0,\r
+            gST->ConOut->Mode->CursorRow,\r
+            NULL,\r
+            STRING_TOKEN (STR_VER_OUTPUT_SIMPLE),\r
+            gShellLevel3HiiHandle,\r
+            gEfiShellProtocol->MajorVersion,\r
+            gEfiShellProtocol->MinorVersion\r
+           );\r
+        }\r
       } else {\r
         ShellPrintHiiEx (\r
           0,\r