]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VolInfo/VolInfo.c
BaseTools-Source: Update displayed version information
[mirror_edk2.git] / BaseTools / Source / C / VolInfo / VolInfo.c
index 87e78d48a872ebbefe090967c822c10e5718637d..4fa87d41eea0e0b64ee2df141cffd199c010ff9b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The tool dumps the contents of a firmware volume\r
 \r
-Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
 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
@@ -46,8 +46,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 EFI_GUID  gEfiCrc32GuidedSectionExtractionProtocolGuid = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;\r
 \r
-#define UTILITY_MAJOR_VERSION      0\r
-#define UTILITY_MINOR_VERSION      83\r
+#define UTILITY_MAJOR_VERSION      1
+#define UTILITY_MINOR_VERSION      0
 \r
 #define UTILITY_NAME         "VolInfo"\r
 \r
@@ -168,12 +168,11 @@ Returns:
   //\r
   // Print utility header\r
   //\r
-  printf ("%s Version %d.%d %s, %s\n",\r
+  printf ("%s Version %d.%d Build %s\n",
     UTILITY_NAME,\r
     UTILITY_MAJOR_VERSION,\r
     UTILITY_MINOR_VERSION,\r
-    __BUILD_VERSION,\r
-    __DATE__\r
+    __BUILD_VERSION
     );\r
 \r
   //\r
@@ -231,7 +230,7 @@ Returns:
   //\r
   if (argc != 1) {\r
     Usage ();\r
-    return -1;\r
+    return STATUS_ERROR;
   }\r
   //\r
   // Look for help options\r
@@ -239,9 +238,14 @@ Returns:
   if ((strcmp(argv[0], "-h") == 0) || (strcmp(argv[0], "--help") == 0) || \r
       (strcmp(argv[0], "-?") == 0) || (strcmp(argv[0], "/?") == 0)) {\r
     Usage();\r
-    return STATUS_ERROR;\r
+    return STATUS_SUCCESS;
+  }
+  //
+  // Version has already been printed, return success.
+  //
+  if (strcmp(argv[0], "--version") == 0) {
+    return STATUS_SUCCESS;
   }\r
-\r
   //\r
   // Open the file containing the FV\r
   //\r
@@ -1846,7 +1850,7 @@ Returns:
   //\r
   // Copyright declaration\r
   // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");\r
+  fprintf (stdout, "Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.\n\n");
   fprintf (stdout, "  Display Tiano Firmware Volume FFS image information\n\n");\r
 \r
   //\r
@@ -1857,6 +1861,8 @@ Returns:
             Parse basename to file-guid cross reference file(s).\n");\r
   fprintf (stdout, "  --offset offset\n\\r
             Offset of file to start processing FV at.\n");\r
+  fprintf (stdout, "  --version\n\
+            Display version of this tool and exit.\n");
   fprintf (stdout, "  -h, --help\n\\r
             Show this help message and exit.\n");\r
 \r