BaseTools-Source: Update displayed version information
Standardize the --version and --help text command-line options Updated tools to correctly display the Build number when using command-line option --version and exit successfully after termination. Ecc was also updated to print informational messages after the options are parsed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Larry Hauch <larry.hauch@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
This commit is contained in:
@@ -4,7 +4,7 @@ Abstract:
|
||||
Patch the BPB information in boot sector image file.
|
||||
Patch the MBR code in MBR image file.
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -33,8 +33,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
// Utility version information
|
||||
//
|
||||
#define UTILITY_MAJOR_VERSION 0
|
||||
#define UTILITY_MINOR_VERSION 1
|
||||
#define UTILITY_MAJOR_VERSION 1
|
||||
#define UTILITY_MINOR_VERSION 0
|
||||
|
||||
void
|
||||
Version (
|
||||
@@ -56,10 +56,7 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
printf ("%s Version %d.%d %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||
printf ("Copyright (c) 1999-2014 Intel Corporation. All rights reserved.\n");
|
||||
printf ("\n The BootSectImage tool prints information or patch destination file by source\n");
|
||||
printf (" file for BIOS Parameter Block (BPB) or Master Boot Record (MBR).\n");
|
||||
printf ("%s Version %d.%d Build %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -82,6 +79,9 @@ Returns:
|
||||
--*/
|
||||
{
|
||||
Version();
|
||||
printf ("Copyright (c) 1999-2016 Intel Corporation. All rights reserved.\n");
|
||||
printf ("\n The BootSectImage tool prints information or patch destination file by source\n");
|
||||
printf (" file for BIOS Parameter Block (BPB) or Master Boot Record (MBR).\n");
|
||||
printf ("\nUsage: \n\
|
||||
BootSectImage\n\
|
||||
[-f, --force force patch even if the FAT type of SrcImage and DstImage mismatch]\n\
|
||||
|
@@ -6,7 +6,7 @@ FILE := EFILDR_HEADER
|
||||
<PeImageFileContent> +
|
||||
The order of EFILDR_IMAGE is same as the order of placing PeImageFileContent.
|
||||
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -51,8 +51,8 @@ typedef struct {
|
||||
//
|
||||
// Utility version information
|
||||
//
|
||||
#define UTILITY_MAJOR_VERSION 0
|
||||
#define UTILITY_MINOR_VERSION 1
|
||||
#define UTILITY_MAJOR_VERSION 1
|
||||
#define UTILITY_MINOR_VERSION 0
|
||||
|
||||
void
|
||||
Version (
|
||||
@@ -74,9 +74,8 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
printf ("%s Version %d.%d %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||
printf ("Copyright (c) 1999-2014 Intel Corporation. All rights reserved.\n");
|
||||
printf ("\n The EfiLdrImage tool is used to combine PE files into EFILDR image with Efi loader header.\n");
|
||||
printf ("%s Version %d.%d Build %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
VOID
|
||||
@@ -85,7 +84,9 @@ Usage (
|
||||
)
|
||||
{
|
||||
printf ("Usage: EfiLdrImage -o OutImage LoaderImage PeImage1 PeImage2 ... PeImageN\n");
|
||||
exit (1);
|
||||
printf ("%s Version %d.%d Build %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||
printf ("Copyright (c) 1999-2016 Intel Corporation. All rights reserved.\n");
|
||||
printf ("\n The EfiLdrImage tool is used to combine PE files into EFILDR image with Efi loader header.\n");
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
@@ -180,7 +181,7 @@ Returns:
|
||||
SetUtilityName (UTILITY_NAME);
|
||||
|
||||
if (argc == 1) {
|
||||
Usage();
|
||||
printf ("Usage: EfiLdrImage -o OutImage LoaderImage PeImage1 PeImage2 ... PeImageN\n");
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
Split a file into two pieces at the request offset.
|
||||
|
||||
Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available
|
||||
under the terms and conditions of the BSD License which accompanies this
|
||||
distribution. The full text of the license may be found at
|
||||
@@ -34,8 +34,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
// Utility version information
|
||||
//
|
||||
#define UTILITY_MAJOR_VERSION 0
|
||||
#define UTILITY_MINOR_VERSION 1
|
||||
#define UTILITY_MAJOR_VERSION 1
|
||||
#define UTILITY_MINOR_VERSION 0
|
||||
|
||||
void
|
||||
Version (
|
||||
@@ -57,10 +57,7 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
printf ("%s Version %d.%d %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||
printf ("Copyright (c) 1999-2015 Intel Corporation. All rights reserved.\n");
|
||||
printf ("\n SplitFile creates two Binary files either in the same directory as the current working\n");
|
||||
printf (" directory or in the specified directory.\n");
|
||||
printf ("%s Version %d.%d Build %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -83,6 +80,9 @@ Returns:
|
||||
--*/
|
||||
{
|
||||
Version();
|
||||
printf ("Copyright (c) 1999-2016 Intel Corporation. All rights reserved.\n");
|
||||
printf ("\n SplitFile creates two Binary files either in the same directory as the current working\n");
|
||||
printf (" directory or in the specified directory.\n");
|
||||
printf ("\nUsage: \n\
|
||||
Split\n\
|
||||
-f, --filename inputFile to split\n\
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
VfrCompiler main class and main function.
|
||||
|
||||
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -412,8 +412,8 @@ CVfrCompiler::Usage (
|
||||
UINT32 Index;
|
||||
CONST CHAR8 *Help[] = {
|
||||
" ",
|
||||
"VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION,
|
||||
"Copyright (c) 2004-2014 Intel Corporation. All rights reserved.",
|
||||
"VfrCompile version " VFR_COMPILER_VERSION "Build " __BUILD_VERSION,
|
||||
"Copyright (c) 2004-2016 Intel Corporation. All rights reserved.",
|
||||
" ",
|
||||
"Usage: VfrCompile [options] VfrFile",
|
||||
" ",
|
||||
@@ -451,7 +451,7 @@ CVfrCompiler::Version (
|
||||
{
|
||||
UINT32 Index;
|
||||
CONST CHAR8 *Help[] = {
|
||||
"VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION,
|
||||
"VfrCompile version " VFR_COMPILER_VERSION "Build " __BUILD_VERSION,
|
||||
NULL
|
||||
};
|
||||
for (Index = 0; Help[Index] != NULL; Index++) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
VfrCompiler internal defintions.
|
||||
|
||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "ParseInf.h"
|
||||
|
||||
#define PROGRAM_NAME "VfrCompile"
|
||||
#define VFR_COMPILER_VERSION " 2.00 (UEFI 2.4) "
|
||||
#define VFR_COMPILER_VERSION " 2.01 (UEFI 2.4) "
|
||||
//
|
||||
// This is how we invoke the C preprocessor on the VFR source file
|
||||
// to resolve #defines, #includes, etc. To make C source files
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The tool dumps the contents of a firmware volume
|
||||
|
||||
Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -46,8 +46,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;
|
||||
|
||||
#define UTILITY_MAJOR_VERSION 0
|
||||
#define UTILITY_MINOR_VERSION 83
|
||||
#define UTILITY_MAJOR_VERSION 1
|
||||
#define UTILITY_MINOR_VERSION 0
|
||||
|
||||
#define UTILITY_NAME "VolInfo"
|
||||
|
||||
@@ -168,12 +168,11 @@ Returns:
|
||||
//
|
||||
// Print utility header
|
||||
//
|
||||
printf ("%s Version %d.%d %s, %s\n",
|
||||
printf ("%s Version %d.%d Build %s\n",
|
||||
UTILITY_NAME,
|
||||
UTILITY_MAJOR_VERSION,
|
||||
UTILITY_MINOR_VERSION,
|
||||
__BUILD_VERSION,
|
||||
__DATE__
|
||||
__BUILD_VERSION
|
||||
);
|
||||
|
||||
//
|
||||
@@ -231,7 +230,7 @@ Returns:
|
||||
//
|
||||
if (argc != 1) {
|
||||
Usage ();
|
||||
return -1;
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
//
|
||||
// Look for help options
|
||||
@@ -239,9 +238,14 @@ Returns:
|
||||
if ((strcmp(argv[0], "-h") == 0) || (strcmp(argv[0], "--help") == 0) ||
|
||||
(strcmp(argv[0], "-?") == 0) || (strcmp(argv[0], "/?") == 0)) {
|
||||
Usage();
|
||||
return STATUS_ERROR;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
//
|
||||
// Version has already been printed, return success.
|
||||
//
|
||||
if (strcmp(argv[0], "--version") == 0) {
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
//
|
||||
// Open the file containing the FV
|
||||
//
|
||||
@@ -1846,7 +1850,7 @@ Returns:
|
||||
//
|
||||
// Copyright declaration
|
||||
//
|
||||
fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");
|
||||
fprintf (stdout, "Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.\n\n");
|
||||
fprintf (stdout, " Display Tiano Firmware Volume FFS image information\n\n");
|
||||
|
||||
//
|
||||
@@ -1857,6 +1861,8 @@ Returns:
|
||||
Parse basename to file-guid cross reference file(s).\n");
|
||||
fprintf (stdout, " --offset offset\n\
|
||||
Offset of file to start processing FV at.\n");
|
||||
fprintf (stdout, " --version\n\
|
||||
Display version of this tool and exit.\n");
|
||||
fprintf (stdout, " -h, --help\n\
|
||||
Show this help message and exit.\n");
|
||||
|
||||
|
Reference in New Issue
Block a user