summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-02 20:17:36 +0000
committerywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-02 20:17:36 +0000
commitf091efb3cb895692a55c310c368943bb4c108ba1 (patch)
tree51e140f919c4a6c0f6172549038b6c4cbdd24087 /Tools
parenta3ab2a47d9ecb2295802726fd17f048c14519aab (diff)
downloadedk2-platforms-f091efb3cb895692a55c310c368943bb4c108ba1.tar.xz
Added or modified utility version and usage display.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2159 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/CCode/Source/CreateMtFile/CreateMtFile.c40
-rw-r--r--Tools/CCode/Source/EfiCompress/EfiCompressMain.c16
-rw-r--r--Tools/CCode/Source/EfiRom/EfiRom.c56
-rw-r--r--Tools/CCode/Source/FlashMap/FlashMap.c57
-rw-r--r--Tools/CCode/Source/FwImage/fwimage.c40
-rw-r--r--Tools/CCode/Source/GenAcpiTable/GenAcpiTable.c51
-rw-r--r--Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c52
-rw-r--r--Tools/CCode/Source/GenBsfImage/GenBsfImage.c53
-rw-r--r--Tools/CCode/Source/GenBsfImage/GenBsfImage.h2
-rw-r--r--Tools/CCode/Source/GenDepex/GenDepex.c20
-rwxr-xr-xTools/CCode/Source/ModifyInf/ModifyInf.c10
-rw-r--r--Tools/CCode/Source/Strip/Strip.c16
12 files changed, 312 insertions, 101 deletions
diff --git a/Tools/CCode/Source/CreateMtFile/CreateMtFile.c b/Tools/CCode/Source/CreateMtFile/CreateMtFile.c
index 7d6d2d95bd..8bb07293e3 100644
--- a/Tools/CCode/Source/CreateMtFile/CreateMtFile.c
+++ b/Tools/CCode/Source/CreateMtFile/CreateMtFile.c
@@ -46,13 +46,13 @@ ProcessArgs (
static
void
-CMFUsage (
+Usage (
VOID
);
static
void
-CMFVersion (
+Version (
VOID
);
@@ -157,30 +157,30 @@ Returns:
Argc--;
if (Argc < 1) {
- CMFUsage();
+ Usage();
return EFI_INVALID_PARAMETER;
}
if ((strcmp(Argv[0], "-h") == 0) || (strcmp(Argv[0], "--help") == 0) ||
(strcmp(Argv[0], "-?") == 0) || (strcmp(Argv[0], "/?") == 0)) {
- CMFUsage();
+ Usage();
return EFI_INVALID_PARAMETER;
}
if ((strcmp(Argv[0], "-V") == 0) || (strcmp(Argv[0], "--version") == 0)) {
- CMFVersion();
+ Version();
return EFI_INVALID_PARAMETER;
}
if (Argc < 2) {
- CMFUsage ();
+ Usage ();
return EFI_INVALID_PARAMETER;
}
//
// If first arg is dash-option, then print usage.
//
if (Argv[0][0] == '-') {
- CMFUsage ();
+ Usage ();
return EFI_INVALID_PARAMETER;
}
//
@@ -212,7 +212,7 @@ Returns:
if ((Argv[0][0] == '0') && ((Argv[0][1] == 'x') || (Argv[0][1] == 'X'))) {
if (sscanf (Argv[0], "%x", &Options->FileSize) != 1) {
printf ("ERROR: Invalid file size '%s'\n", Argv[0]);
- CMFUsage ();
+ Usage ();
return EFI_INVALID_PARAMETER;
}
//
@@ -221,7 +221,7 @@ Returns:
} else {
if (sscanf (Argv[0], "%d", &Options->FileSize) != 1) {
printf ("ERROR: Invalid file size '%s'\n", Argv[0]);
- CMFUsage ();
+ Usage ();
return EFI_INVALID_PARAMETER;
}
}
@@ -237,14 +237,14 @@ Returns:
static
void
-CMFVersion(
+Version(
void
)
/*++
Routine Description:
- Print out version information for Strip.
+ Print out version information for this utility.
Arguments:
@@ -265,7 +265,7 @@ Returns:
//
static
void
-CMFUsage (
+Usage (
VOID
)
/*++
@@ -284,14 +284,14 @@ Returns:
--*/
{
- CMFVersion();
+ Version();
- printf ("\n Usage: %s OutFileName FileSize \n\
- where: \n\
- OutFileName is the name of the output file to generate \n\
- FileSize is the size of the file to create \n\
- Examples: \n\
- %s OutFile.bin 32K \n\
- %s OutFile.bin 0x1000 \n",UTILITY_NAME, UTILITY_NAME, UTILITY_NAME);
+ printf ("\nUsage: %s OutFileName FileSize \n\
+ where: \n\
+ OutFileName is the name of the output file to generate \n\
+ FileSize is the size of the file to create \n\
+ Examples: \n\
+ %s OutFile.bin 32K \n\
+ %s OutFile.bin 0x1000 \n",UTILITY_NAME, UTILITY_NAME, UTILITY_NAME);
}
diff --git a/Tools/CCode/Source/EfiCompress/EfiCompressMain.c b/Tools/CCode/Source/EfiCompress/EfiCompressMain.c
index b07f62990d..360b7355cb 100644
--- a/Tools/CCode/Source/EfiCompress/EfiCompressMain.c
+++ b/Tools/CCode/Source/EfiCompress/EfiCompressMain.c
@@ -34,7 +34,7 @@ Abstract:
#define UTILITY_MINOR_VERSION 1
void
-ECVersion(
+Version(
void
)
/*++
@@ -58,7 +58,7 @@ Returns:
}
void
-ECUsage(
+Usage(
void
)
/*++
@@ -77,8 +77,8 @@ Returns:
--*/
{
- ECVersion();
- printf ("\n Usage: %s Inputfile Outputfile\n", UTILITY_NAME);
+ Version();
+ printf ("\nUsage: %s Inputfile Outputfile\n", UTILITY_NAME);
}
@@ -122,23 +122,23 @@ Returns:
infile = outfile = NULL;
if (argc < 1) {
- ECUsage();
+ Usage();
goto Done;
}
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
- ECUsage();
+ Usage();
goto Done;
}
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
- ECVersion();
+ Version();
goto Done;
}
if (argc != 3) {
- ECUsage();
+ Usage();
goto Done;
}
diff --git a/Tools/CCode/Source/EfiRom/EfiRom.c b/Tools/CCode/Source/EfiRom/EfiRom.c
index 5aca23fe80..4041c5078d 100644
--- a/Tools/CCode/Source/EfiRom/EfiRom.c
+++ b/Tools/CCode/Source/EfiRom/EfiRom.c
@@ -37,7 +37,9 @@ Abstract:
//
// Version of this utility
//
-#define UTILITY_VERSION "v2.5"
+#define UTILITY_NAME "EfiRom"
+#define UTILITY_MAJOR_VERSION 2
+#define UTILITY_MINOR_VERSION 5
//
// Define some status return values
@@ -134,6 +136,12 @@ static STRING_LOOKUP mSubsystemTypes[] = {
//
static
void
+Version (
+ VOID
+ );
+
+static
+void
Usage (
VOID
);
@@ -978,6 +986,18 @@ Returns:
Usage ();
return STATUS_ERROR;
}
+
+ if ((strcmp(Argv[0], "-h") == 0) || (strcmp(Argv[0], "--help") == 0) ||
+ (strcmp(Argv[0], "-?") == 0) || (strcmp(Argv[0], "/?") == 0)) {
+ Usage();
+ return STATUS_ERROR;
+ }
+
+ if ((strcmp(Argv[0], "-V") == 0) || (strcmp(Argv[0], "--version") == 0)) {
+ Version();
+ return STATUS_ERROR;
+ }
+
//
// Process until no more arguments
//
@@ -1226,6 +1246,30 @@ Returns:
static
void
+Version (
+ VOID
+ )
+/*++
+
+Routine Description:
+
+ Print version information for this utility.
+
+Arguments:
+
+ None.
+
+Returns:
+
+ Nothing.
+--*/
+{
+ printf ("%s v%d.%d -EDK utility to create an option ROM image from a list of input files\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
+ printf ("Copyright (c) 1999-2006 Intel Corporation. All rights reserved.\n");
+}
+
+static
+void
Usage (
VOID
)
@@ -1247,12 +1291,9 @@ Returns:
{
int Index;
static const char *Msg[] = {
- "EfiRom "UTILITY_VERSION " - Intel EFI Make Option ROM utility",
- " Copyright (C), 1999-2002 Intel Coproration\n",
- " Create an option ROM image from a list of input files",
- " Usage: efirom {-p} [-v VendorId] [-d DeviceId] {-o OutFileName} ",
+ "\nUsage: efirom {-p} [-v VendorId] [-d DeviceId] {-o OutFileName} ",
" [-e|-b] [FileName(s)]",
- " where:",
+ " where:",
" VendorId - required hex PCI Vendor ID for the device",
" DeviceId - required hex PCI Device ID for the device",
" OutFileName - optional output file name. Default is the first input",
@@ -1270,12 +1311,15 @@ Returns:
" -rev Revision - to use hex Revision in the PCI data structure header for",
" the following FileName",
" -dump - to dump the headers of an existing option ROM image",
+ " -h,--help,-?,/? - to display help messages",
+ " -V,--version - to display version information",
"",
"Example usage: EfiRom -v 0xABCD -d 0x1234 -b File1.bin File2.bin -e File1.efi File2.efi ",
"",
NULL
};
+ Version();
for (Index = 0; Msg[Index] != NULL; Index++) {
fprintf (stdout, "%s\n", Msg[Index]);
}
diff --git a/Tools/CCode/Source/FlashMap/FlashMap.c b/Tools/CCode/Source/FlashMap/FlashMap.c
index 88f5003d2d..41f6de4025 100644
--- a/Tools/CCode/Source/FlashMap/FlashMap.c
+++ b/Tools/CCode/Source/FlashMap/FlashMap.c
@@ -32,7 +32,13 @@ Abstract:
#include "FlashDefFile.h"
#include "Symbols.h"
-#define UTILITY_NAME "FlashMap"
+//
+// Version of this utility
+//
+#define UTILITY_NAME "FlashMap"
+#define UTILITY_MAJOR_VERSION 1
+#define UTILITY_MINOR_VERSION 0
+
typedef struct _STRING_LIST {
struct _STRING_LIST *Next;
@@ -83,6 +89,12 @@ MergeMicrocodeFiles (
static
void
+Version (
+ VOID
+ );
+
+static
+void
Usage (
VOID
);
@@ -346,6 +358,18 @@ Returns:
Usage ();
return STATUS_ERROR;
}
+
+ if ((strcmp(argv[0], "-h") == 0) || (strcmp(argv[0], "--help") == 0) ||
+ (strcmp(argv[0], "-?") == 0) || (strcmp(argv[0], "/?") == 0)) {
+ Usage();
+ return STATUS_ERROR;
+ }
+
+ if ((strcmp(argv[0], "-V") == 0) || (strcmp(argv[0], "--version") == 0)) {
+ Version();
+ return STATUS_ERROR;
+ }
+
//
// Clear out our globals, then start walking the arguments
//
@@ -697,6 +721,30 @@ Returns:
static
void
+Version (
+ VOID
+ )
+/*++
+
+Routine Description:
+
+ Print version information for this utility.
+
+Arguments:
+
+ None.
+
+Returns:
+
+ Nothing.
+--*/
+{
+ printf ("%s v%d.%d -EDK Utility for flash management for EFI build environment.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
+ printf ("Copyright (c) 1999-2006 Intel Corporation. All rights reserved.\n");
+}
+
+static
+void
Usage (
VOID
)
@@ -715,12 +763,14 @@ Returns:
{
int i;
char *Msg[] = {
- "Usage: FlashTool -fdf FlashDefFile -flashdevice FlashDevice",
+ "\nUsage: FlashTool -fdf FlashDefFile -flashdevice FlashDevice",
" -flashdeviceimage FlashDeviceImage -mci MCIFile -mco MCOFile",
" -discover FDImage -dsc DscFile -asmincfile AsmIncFile",
" -imageOut ImageOutFile -hfile HFile -strsub InStrFile OutStrFile",
" -baseaddr BaseAddr -align Alignment -padvalue PadValue",
" -mcmerge MCIFile(s)",
+ " -h,--help,-?,/? - to display help messages",
+ " -V,--version - to display version information",
" where",
" FlashDefFile - input Flash Definition File",
" FlashDevice - flash device to use (from flash definition file)",
@@ -737,9 +787,10 @@ Returns:
" Alignment - alignment to use when merging microcode binaries",
" PadValue - byte value to use as pad value when aligning microcode binaries",
" MCIFile(s) - one or more microcode binary files to merge/concatenate",
- "",
NULL
};
+
+ Version();
for (i = 0; Msg[i] != NULL; i++) {
fprintf (stdout, "%s\n", Msg[i]);
}
diff --git a/Tools/CCode/Source/FwImage/fwimage.c b/Tools/CCode/Source/FwImage/fwimage.c
index 92bfd16a6f..0f231488a3 100644
--- a/Tools/CCode/Source/FwImage/fwimage.c
+++ b/Tools/CCode/Source/FwImage/fwimage.c
@@ -35,7 +35,12 @@ Abstract:
#include "CommonLib.h"
#include "EfiUtilityMsgs.c"
-#define UTILITY_NAME "FwImage"
+//
+// Version of this utility
+//
+#define UTILITY_NAME "FwImage"
+#define UTILITY_MAJOR_VERSION 1
+#define UTILITY_MINOR_VERSION 0
#ifdef __GNUC__
typedef unsigned long ULONG;
@@ -44,12 +49,27 @@ typedef unsigned char *PUCHAR;
typedef unsigned short USHORT;
#endif
+static
+void
+Version (
+ VOID
+ )
+{
+ printf ("%s v%d.%d -EDK Utility for Converting a pe32+ image to an FW image type.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
+ printf ("Copyright (c) 1999-2006 Intel Corporation. All rights reserved.\n");
+}
+
+
VOID
Usage (
VOID
)
{
- printf ("Usage: " UTILITY_NAME " {-t time-date} [BASE|SEC|PEI_CORE|PEIM|DXE_CORE|DXE_DRIVER|DXE_RUNTIME_DRIVER|DXE_SAL_DRIVER|DXE_SMM_DRIVER|TOOL|UEFI_DRIVER|UEFI_APPLICATION|USER_DEFINED] peimage [outimage]");
+ Version();
+ printf ("\nUsage: " UTILITY_NAME " {-t time-date} {-h|--help|-?|/?|-V|--version} \n\
+ [BASE|SEC|PEI_CORE|PEIM|DXE_CORE|DXE_DRIVER|DXE_RUNTIME_DRIVER|\n\
+ DXE_SAL_DRIVER|DXE_SMM_DRIVER|TOOL|UEFI_DRIVER|UEFI_APPLICATION|\n\
+ USER_DEFINED] peimage [outimage]");
}
static
@@ -185,6 +205,22 @@ Returns:
TimeStamp = 0;
TimeStampPresent = FALSE;
+ if (argc < 1) {
+ Usage();
+ return STATUS_ERROR;
+ }
+
+ if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
+ (strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
+ Usage();
+ return STATUS_ERROR;
+ }
+
+ if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
+ Version();
+ return STATUS_ERROR;
+ }
+
//
// Look for -t time-date option first. If the time is "0", then
// skip it.
diff --git a/Tools/CCode/Source/GenAcpiTable/GenAcpiTable.c b/Tools/CCode/Source/GenAcpiTable/GenAcpiTable.c
index f1efa3c302..457ac65fef 100644
--- a/Tools/CCode/Source/GenAcpiTable/GenAcpiTable.c
+++ b/Tools/CCode/Source/GenAcpiTable/GenAcpiTable.c
@@ -32,8 +32,9 @@ Abstract:
//
// Version of this utility
//
-#define UTILITY_NAME "GenAcpiTable"
-#define UTILITY_VERSION "v0.11"
+#define UTILITY_NAME "GenAcpiTable"
+#define UTILITY_MAJOR_VERSION 0
+#define UTILITY_MINOR_VERSION 11
//
// Define the max length of a filename
@@ -83,6 +84,12 @@ static STRING_LOOKUP mSubsystemTypes[] = {
//
static
void
+Version (
+ VOID
+ );
+
+static
+void
Usage (
VOID
);
@@ -489,6 +496,22 @@ Returns:
Argc--;
Argv++;
+ if (Argc < 1) {
+ Usage();
+ return STATUS_ERROR;
+ }
+
+ if ((strcmp(Argv[0], "-h") == 0) || (strcmp(Argv[0], "--help") == 0) ||
+ (strcmp(Argv[0], "-?") == 0) || (strcmp(Argv[0], "/?") == 0)) {
+ Usage();
+ return STATUS_ERROR;
+ }
+
+ if ((strcmp(Argv[0], "-V") == 0) || (strcmp(Argv[0], "--version") == 0)) {
+ Version();
+ return STATUS_ERROR;
+ }
+
if (Argc != 2) {
Usage ();
return STATUS_ERROR;
@@ -508,6 +531,17 @@ Returns:
static
void
+Version (
+ VOID
+ )
+{
+ printf ("%s v%d.%d -EDK Utility for generating ACPI Table image from an EFI PE32 image.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
+ printf ("Copyright (c) 1999-2006 Intel Corporation. All rights reserved.\n");
+}
+
+
+static
+void
Usage (
VOID
)
@@ -529,15 +563,14 @@ Returns:
{
int Index;
static const char *Msg[] = {
- UTILITY_NAME " version "UTILITY_VERSION " - Generate ACPI Table image utility",
- " Generate an ACPI Table image from an EFI PE32 image",
- " Usage: "UTILITY_NAME " InFileName OutFileName",
- " where:",
- " InFileName - name of the input PE32 file",
- " OutFileName - to write output to OutFileName rather than InFileName"DEFAULT_OUTPUT_EXTENSION,
- "",
+ "\nUsage: "UTILITY_NAME " {-h|--help|-?|/?|-V|--version} InFileName OutFileName",
+ " where:",
+ " InFileName - name of the input PE32 file",
+ " OutFileName - to write output to OutFileName rather than InFileName"DEFAULT_OUTPUT_EXTENSION,
NULL
};
+
+ Version();
for (Index = 0; Msg[Index] != NULL; Index++) {
fprintf (stdout, "%s\n", Msg[Index]);
}
diff --git a/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c b/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
index 462f97fa83..1cc1e83389 100644
--- a/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
+++ b/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+Copyright (c) 1999 - 2006 Intel Corporation. All rights reserved
This software and associated documentation (if any) is furnished
under a license and may only be used or copied in accordance
with the terms of the license. Except as permitted by such
@@ -42,7 +42,10 @@ Abstract:
// A lot of the file-header stuff has been ported, but
// not the section information.
//
-#define TOOLVERSION "0.1"
+
+#define UTILITY_NAME "GenBsfFixup"
+#define UTILITY_MAJOR_VERSION 0
+#define UTILITY_MINOR_VERSION 1
UINT32 gFixup;
@@ -78,6 +81,26 @@ Returns:
return OccupiedSize;
}
+static
+void
+Version (
+ VOID
+ )
+{
+ printf ("%s v%d.%d -EDK Utility to Fixup the SEC component for IA32.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
+ printf ("Copyright (c) 1999-2006 Intel Corporation. All rights reserved.\n");
+}
+
+
+VOID
+Usage (
+ VOID
+ )
+{
+ Version();
+ printf ("\nUsage: " UTILITY_NAME " FvVolumeImageFile AddressOfFvInMemory OffsetOfFixup OutputFileName \n");
+}
+
int
ReadHeader (
FILE *In,
@@ -370,14 +393,25 @@ Returns:
Index = 0;
Invert = 0;
- printf (
- "GenBsfFixup EFI 2.0. Version %s, %s\n""Copyright (c) 2000-2001, Intel Corporation\n\n",
- TOOLVERSION,
- __DATE__
- );
-
+
+ if (argc < 1) {
+ Usage();
+ return -1;
+ }
+
+ if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
+ (strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
+ Usage();
+ return -1;
+ }
+
+ if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
+ Version();
+ return -1;
+ }
+
if (argc != 5) {
- printf ("Usage:\n"" GenBsfFixup FvVolumeImageFile AddressOfFvInMemory OffsetOfFixup OutputFileName\n");
+ Usage();
return -1;
}
diff --git a/Tools/CCode/Source/GenBsfImage/GenBsfImage.c b/Tools/CCode/Source/GenBsfImage/GenBsfImage.c
index 494f3495c6..1c9dff9258 100644
--- a/Tools/CCode/Source/GenBsfImage/GenBsfImage.c
+++ b/Tools/CCode/Source/GenBsfImage/GenBsfImage.c
@@ -2357,7 +2357,7 @@ Returns:
}
VOID
-PrintUtilityInfo (
+Version (
VOID
)
/*++
@@ -2377,16 +2377,15 @@ Returns:
--*/
{
printf (
- "%s, EFI 2.0 BootStrap File Generation Utility. Version %i.%i, %s.\n\n",
+ "%s, EFI 2.0 BootStrap File Generation Utility. Version %i.%i.\n",
UTILITY_NAME,
UTILITY_MAJOR_VERSION,
- UTILITY_MINOR_VERSION,
- UTILITY_DATE
+ UTILITY_MINOR_VERSION
);
}
VOID
-PrintUsage (
+Usage (
VOID
)
/*++
@@ -2405,13 +2404,16 @@ Returns:
--*/
{
+ Version();
+
printf (
- "Usage: %s -B BaseAddress -S FwVolumeSize\n",
+ "\nUsage: %s -B BaseAddress -S FwVolumeSize\n",
UTILITY_NAME
);
printf (" Where:\n");
- printf ("\tBaseAddress is the starting address of Firmware Volume where\n\tBoot Strapped Image will reside.\n\n");
- printf ("\tFwVolumeSize is the size of Firmware Volume.\n\n");
+ printf (" BaseAddress is the starting address of Firmware Volume where Boot\n");
+ printf (" Strapped Image will reside.\n");
+ printf (" FwVolumeSize is the size of Firmware Volume.\n");
}
EFI_STATUS
@@ -2455,11 +2457,6 @@ Returns:
BOOLEAN IsIA32;
//
- // Display utility information
- //
- PrintUtilityInfo ();
-
- //
// Verify the correct number of IA32 arguments
//
IsIA32 = FALSE;
@@ -2486,7 +2483,7 @@ Returns:
// Make sure argument pair begin with - or /
//
if (argv[Index][0] != '-' && argv[Index][0] != '/') {
- PrintUsage ();
+ Usage ();
printf ("ERROR: Argument pair must begin with \"-\" or \"/\"\n");
return 1;
}
@@ -2495,7 +2492,7 @@ Returns:
// Make sure argument specifier is only one letter
//
if (argv[Index][2] != 0) {
- PrintUsage ();
+ Usage ();
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
return 1;
}
@@ -2515,7 +2512,7 @@ Returns:
break;
default:
- PrintUsage ();
+ Usage ();
printf ("Unrecognized IA32 argument \"%s\".\n", argv[Index]);
IsIA32 = FALSE;
break;
@@ -2562,8 +2559,24 @@ Returns:
//
// Verify the correct number of arguments
//
+ if (argc < 1) {
+ Usage();
+ return -1;
+ }
+
+ if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
+ (strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
+ Usage();
+ return -1;
+ }
+
+ if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
+ Version();
+ return -1;
+ }
+
if (argc != ONE_BSF_ARGS && argc != TWO_BSF_ARGS) {
- PrintUsage ();
+ Usage ();
return 1;
}
@@ -2586,7 +2599,7 @@ Returns:
// Make sure argument pair begin with - or /
//
if (argv[Index][0] != '-' && argv[Index][0] != '/') {
- PrintUsage ();
+ Usage ();
printf ("ERROR: Argument pair must begin with \"-\" or \"/\"\n");
return 1;
}
@@ -2595,7 +2608,7 @@ Returns:
// Make sure argument specifier is only one letter
//
if (argv[Index][2] != 0) {
- PrintUsage ();
+ Usage ();
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
return 1;
}
@@ -2636,7 +2649,7 @@ Returns:
break;
default:
- PrintUsage ();
+ Usage ();
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
return 1;
break;
diff --git a/Tools/CCode/Source/GenBsfImage/GenBsfImage.h b/Tools/CCode/Source/GenBsfImage/GenBsfImage.h
index 63db1218d5..4b6e6ea7b5 100644
--- a/Tools/CCode/Source/GenBsfImage/GenBsfImage.h
+++ b/Tools/CCode/Source/GenBsfImage/GenBsfImage.h
@@ -128,7 +128,7 @@ Abstract:
// Utility version information
//
#define UTILITY_MAJOR_VERSION 0
-#define UTILITY_MINOR_VERSION 0
+#define UTILITY_MINOR_VERSION 1
#define UTILITY_DATE __DATE__
//
diff --git a/Tools/CCode/Source/GenDepex/GenDepex.c b/Tools/CCode/Source/GenDepex/GenDepex.c
index b010102e26..e8481b518b 100644
--- a/Tools/CCode/Source/GenDepex/GenDepex.c
+++ b/Tools/CCode/Source/GenDepex/GenDepex.c
@@ -86,7 +86,7 @@ ParseDepex (
);
VOID
-GDVersion (
+Version (
VOID
)
/*++
@@ -115,7 +115,7 @@ Returns:
}
VOID
-GDUsage (
+Usage (
VOID
)
/*++
@@ -134,9 +134,9 @@ Returns:
--*/
{
- GDVersion();
+ Version();
printf (
- "\n Usage: %s -I InputFile -O OutputFile [-P <Optional Boundary for padding up>] \n",
+ "\nUsage: %s -I InputFile -O OutputFile [-P <Optional Boundary for padding up>] \n",
UTILITY_NAME
);
printf (" Where:\n");
@@ -857,24 +857,24 @@ Returns:
Pad_Flag = FALSE;
if (argc < 1) {
- GDUsage();
+ Usage();
return -1;
}
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
- GDUsage();
+ Usage();
return 0;
}
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
- GDVersion();
+ Version();
return 0;
}
if (argc < 5) {
printf ("Not enough arguments\n");
- GDUsage();
+ Usage();
return EFI_INVALID_PARAMETER;
}
@@ -920,13 +920,13 @@ Returns:
if (InFile == NULL) {
printf ("Can not open <INFILE> for reading.\n");
- GDUsage();
+ Usage();
return EFI_ABORTED;
}
if (OutFile == NULL) {
printf ("Can not open <OUTFILE> for writting.\n");
- GDUsage();
+ Usage();
return EFI_ABORTED;
}
diff --git a/Tools/CCode/Source/ModifyInf/ModifyInf.c b/Tools/CCode/Source/ModifyInf/ModifyInf.c
index 5e3d17ddf4..1b1a9e29a1 100755
--- a/Tools/CCode/Source/ModifyInf/ModifyInf.c
+++ b/Tools/CCode/Source/ModifyInf/ModifyInf.c
@@ -271,7 +271,7 @@ Returns:
}
void
-MIUsage(
+Usage(
void
)
/*++
@@ -291,7 +291,7 @@ Returns:
--*/
{
MIVersion();
- printf ("\n Usage: %s InputFile OutputFile Pattern_String [Pattern_String бн]\n\
+ printf ("\nUsage: %s InputFile OutputFile Pattern_String [Pattern_String бн]\n\
Where: \n\
Pattern_String is of the format (note that the section name must be \n\
enclosed within square brackets):\n\
@@ -334,13 +334,13 @@ Returns:
FILE *fpout;
if (argc < 1) {
- MIUsage();
+ Usage();
return -1;
}
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
- MIUsage();
+ Usage();
return 0;
}
@@ -350,7 +350,7 @@ Returns:
}
if (argc < 3) {
- MIUsage();
+ Usage();
return -1;
}
diff --git a/Tools/CCode/Source/Strip/Strip.c b/Tools/CCode/Source/Strip/Strip.c
index a89bcf9a8a..6215ca8fc4 100644
--- a/Tools/CCode/Source/Strip/Strip.c
+++ b/Tools/CCode/Source/Strip/Strip.c
@@ -31,7 +31,7 @@ Abstract:
void
-StripVersion(
+Version(
void
)
/*++
@@ -55,7 +55,7 @@ Returns:
}
void
-StripUsage(
+Usage(
void
)
/*++
@@ -74,8 +74,8 @@ Returns:
--*/
{
- StripVersion();
- printf ("\n Usage: %s InputFile OutputFile\n", UTILITY_NAME);
+ Version();
+ printf ("\nUsage: %s InputFile OutputFile\n", UTILITY_NAME);
}
int
@@ -109,23 +109,23 @@ Returns:
char *Ptrx;
if (argc < 1) {
- StripUsage();
+ Usage();
return -1;
}
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
- StripUsage();
+ Usage();
return 0;
}
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
- StripVersion();
+ Version();
return 0;
}
if (argc < 3) {
- StripUsage();
+ Usage();
return -1;
}