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
This commit is contained in:
@ -46,13 +46,13 @@ ProcessArgs (
|
|||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
CMFUsage (
|
Usage (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
CMFVersion (
|
Version (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -157,30 +157,30 @@ Returns:
|
|||||||
Argc--;
|
Argc--;
|
||||||
|
|
||||||
if (Argc < 1) {
|
if (Argc < 1) {
|
||||||
CMFUsage();
|
Usage();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(Argv[0], "-h") == 0) || (strcmp(Argv[0], "--help") == 0) ||
|
if ((strcmp(Argv[0], "-h") == 0) || (strcmp(Argv[0], "--help") == 0) ||
|
||||||
(strcmp(Argv[0], "-?") == 0) || (strcmp(Argv[0], "/?") == 0)) {
|
(strcmp(Argv[0], "-?") == 0) || (strcmp(Argv[0], "/?") == 0)) {
|
||||||
CMFUsage();
|
Usage();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(Argv[0], "-V") == 0) || (strcmp(Argv[0], "--version") == 0)) {
|
if ((strcmp(Argv[0], "-V") == 0) || (strcmp(Argv[0], "--version") == 0)) {
|
||||||
CMFVersion();
|
Version();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Argc < 2) {
|
if (Argc < 2) {
|
||||||
CMFUsage ();
|
Usage ();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// If first arg is dash-option, then print usage.
|
// If first arg is dash-option, then print usage.
|
||||||
//
|
//
|
||||||
if (Argv[0][0] == '-') {
|
if (Argv[0][0] == '-') {
|
||||||
CMFUsage ();
|
Usage ();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -212,7 +212,7 @@ Returns:
|
|||||||
if ((Argv[0][0] == '0') && ((Argv[0][1] == 'x') || (Argv[0][1] == 'X'))) {
|
if ((Argv[0][0] == '0') && ((Argv[0][1] == 'x') || (Argv[0][1] == 'X'))) {
|
||||||
if (sscanf (Argv[0], "%x", &Options->FileSize) != 1) {
|
if (sscanf (Argv[0], "%x", &Options->FileSize) != 1) {
|
||||||
printf ("ERROR: Invalid file size '%s'\n", Argv[0]);
|
printf ("ERROR: Invalid file size '%s'\n", Argv[0]);
|
||||||
CMFUsage ();
|
Usage ();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -221,7 +221,7 @@ Returns:
|
|||||||
} else {
|
} else {
|
||||||
if (sscanf (Argv[0], "%d", &Options->FileSize) != 1) {
|
if (sscanf (Argv[0], "%d", &Options->FileSize) != 1) {
|
||||||
printf ("ERROR: Invalid file size '%s'\n", Argv[0]);
|
printf ("ERROR: Invalid file size '%s'\n", Argv[0]);
|
||||||
CMFUsage ();
|
Usage ();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -237,14 +237,14 @@ Returns:
|
|||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
CMFVersion(
|
Version(
|
||||||
void
|
void
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Print out version information for Strip.
|
Print out version information for this utility.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
CMFUsage (
|
Usage (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -284,14 +284,14 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CMFVersion();
|
Version();
|
||||||
|
|
||||||
printf ("\n Usage: %s OutFileName FileSize \n\
|
printf ("\nUsage: %s OutFileName FileSize \n\
|
||||||
where: \n\
|
where: \n\
|
||||||
OutFileName is the name of the output file to generate \n\
|
OutFileName is the name of the output file to generate \n\
|
||||||
FileSize is the size of the file to create \n\
|
FileSize is the size of the file to create \n\
|
||||||
Examples: \n\
|
Examples: \n\
|
||||||
%s OutFile.bin 32K \n\
|
%s OutFile.bin 32K \n\
|
||||||
%s OutFile.bin 0x1000 \n",UTILITY_NAME, UTILITY_NAME, UTILITY_NAME);
|
%s OutFile.bin 0x1000 \n",UTILITY_NAME, UTILITY_NAME, UTILITY_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ Abstract:
|
|||||||
#define UTILITY_MINOR_VERSION 1
|
#define UTILITY_MINOR_VERSION 1
|
||||||
|
|
||||||
void
|
void
|
||||||
ECVersion(
|
Version(
|
||||||
void
|
void
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -58,7 +58,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ECUsage(
|
Usage(
|
||||||
void
|
void
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -77,8 +77,8 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
ECVersion();
|
Version();
|
||||||
printf ("\n Usage: %s Inputfile Outputfile\n", UTILITY_NAME);
|
printf ("\nUsage: %s Inputfile Outputfile\n", UTILITY_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -122,23 +122,23 @@ Returns:
|
|||||||
infile = outfile = NULL;
|
infile = outfile = NULL;
|
||||||
|
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
ECUsage();
|
Usage();
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
||||||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
||||||
ECUsage();
|
Usage();
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
|
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
|
||||||
ECVersion();
|
Version();
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
ECUsage();
|
Usage();
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,9 @@ Abstract:
|
|||||||
//
|
//
|
||||||
// Version of this utility
|
// 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
|
// Define some status return values
|
||||||
@ -132,6 +134,12 @@ static STRING_LOOKUP mSubsystemTypes[] = {
|
|||||||
//
|
//
|
||||||
// Function prototypes
|
// Function prototypes
|
||||||
//
|
//
|
||||||
|
static
|
||||||
|
void
|
||||||
|
Version (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
Usage (
|
Usage (
|
||||||
@ -978,6 +986,18 @@ Returns:
|
|||||||
Usage ();
|
Usage ();
|
||||||
return STATUS_ERROR;
|
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
|
// Process until no more arguments
|
||||||
//
|
//
|
||||||
@ -1224,6 +1244,30 @@ Returns:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static
|
||||||
void
|
void
|
||||||
Usage (
|
Usage (
|
||||||
@ -1247,12 +1291,9 @@ Returns:
|
|||||||
{
|
{
|
||||||
int Index;
|
int Index;
|
||||||
static const char *Msg[] = {
|
static const char *Msg[] = {
|
||||||
"EfiRom "UTILITY_VERSION " - Intel EFI Make Option ROM utility",
|
"\nUsage: efirom {-p} [-v VendorId] [-d DeviceId] {-o OutFileName} ",
|
||||||
" 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} ",
|
|
||||||
" [-e|-b] [FileName(s)]",
|
" [-e|-b] [FileName(s)]",
|
||||||
" where:",
|
" where:",
|
||||||
" VendorId - required hex PCI Vendor ID for the device",
|
" VendorId - required hex PCI Vendor ID for the device",
|
||||||
" DeviceId - required hex PCI Device ID for the device",
|
" DeviceId - required hex PCI Device ID for the device",
|
||||||
" OutFileName - optional output file name. Default is the first input",
|
" 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",
|
" -rev Revision - to use hex Revision in the PCI data structure header for",
|
||||||
" the following FileName",
|
" the following FileName",
|
||||||
" -dump - to dump the headers of an existing option ROM image",
|
" -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 ",
|
"Example usage: EfiRom -v 0xABCD -d 0x1234 -b File1.bin File2.bin -e File1.efi File2.efi ",
|
||||||
"",
|
"",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Version();
|
||||||
for (Index = 0; Msg[Index] != NULL; Index++) {
|
for (Index = 0; Msg[Index] != NULL; Index++) {
|
||||||
fprintf (stdout, "%s\n", Msg[Index]);
|
fprintf (stdout, "%s\n", Msg[Index]);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,13 @@ Abstract:
|
|||||||
#include "FlashDefFile.h"
|
#include "FlashDefFile.h"
|
||||||
#include "Symbols.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 {
|
typedef struct _STRING_LIST {
|
||||||
struct _STRING_LIST *Next;
|
struct _STRING_LIST *Next;
|
||||||
@ -81,6 +87,12 @@ MergeMicrocodeFiles (
|
|||||||
char PadByteValue
|
char PadByteValue
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static
|
||||||
|
void
|
||||||
|
Version (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
Usage (
|
Usage (
|
||||||
@ -346,6 +358,18 @@ Returns:
|
|||||||
Usage ();
|
Usage ();
|
||||||
return STATUS_ERROR;
|
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
|
// Clear out our globals, then start walking the arguments
|
||||||
//
|
//
|
||||||
@ -695,6 +719,30 @@ Returns:
|
|||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static
|
||||||
void
|
void
|
||||||
Usage (
|
Usage (
|
||||||
@ -715,12 +763,14 @@ Returns:
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *Msg[] = {
|
char *Msg[] = {
|
||||||
"Usage: FlashTool -fdf FlashDefFile -flashdevice FlashDevice",
|
"\nUsage: FlashTool -fdf FlashDefFile -flashdevice FlashDevice",
|
||||||
" -flashdeviceimage FlashDeviceImage -mci MCIFile -mco MCOFile",
|
" -flashdeviceimage FlashDeviceImage -mci MCIFile -mco MCOFile",
|
||||||
" -discover FDImage -dsc DscFile -asmincfile AsmIncFile",
|
" -discover FDImage -dsc DscFile -asmincfile AsmIncFile",
|
||||||
" -imageOut ImageOutFile -hfile HFile -strsub InStrFile OutStrFile",
|
" -imageOut ImageOutFile -hfile HFile -strsub InStrFile OutStrFile",
|
||||||
" -baseaddr BaseAddr -align Alignment -padvalue PadValue",
|
" -baseaddr BaseAddr -align Alignment -padvalue PadValue",
|
||||||
" -mcmerge MCIFile(s)",
|
" -mcmerge MCIFile(s)",
|
||||||
|
" -h,--help,-?,/? - to display help messages",
|
||||||
|
" -V,--version - to display version information",
|
||||||
" where",
|
" where",
|
||||||
" FlashDefFile - input Flash Definition File",
|
" FlashDefFile - input Flash Definition File",
|
||||||
" FlashDevice - flash device to use (from 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",
|
" Alignment - alignment to use when merging microcode binaries",
|
||||||
" PadValue - byte value to use as pad value when aligning 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",
|
" MCIFile(s) - one or more microcode binary files to merge/concatenate",
|
||||||
"",
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Version();
|
||||||
for (i = 0; Msg[i] != NULL; i++) {
|
for (i = 0; Msg[i] != NULL; i++) {
|
||||||
fprintf (stdout, "%s\n", Msg[i]);
|
fprintf (stdout, "%s\n", Msg[i]);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,12 @@ Abstract:
|
|||||||
#include "CommonLib.h"
|
#include "CommonLib.h"
|
||||||
#include "EfiUtilityMsgs.c"
|
#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__
|
#ifdef __GNUC__
|
||||||
typedef unsigned long ULONG;
|
typedef unsigned long ULONG;
|
||||||
@ -44,12 +49,27 @@ typedef unsigned char *PUCHAR;
|
|||||||
typedef unsigned short USHORT;
|
typedef unsigned short USHORT;
|
||||||
#endif
|
#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
|
VOID
|
||||||
Usage (
|
Usage (
|
||||||
VOID
|
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
|
static
|
||||||
@ -185,6 +205,22 @@ Returns:
|
|||||||
TimeStamp = 0;
|
TimeStamp = 0;
|
||||||
TimeStampPresent = FALSE;
|
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
|
// Look for -t time-date option first. If the time is "0", then
|
||||||
// skip it.
|
// skip it.
|
||||||
|
@ -32,8 +32,9 @@ Abstract:
|
|||||||
//
|
//
|
||||||
// Version of this utility
|
// Version of this utility
|
||||||
//
|
//
|
||||||
#define UTILITY_NAME "GenAcpiTable"
|
#define UTILITY_NAME "GenAcpiTable"
|
||||||
#define UTILITY_VERSION "v0.11"
|
#define UTILITY_MAJOR_VERSION 0
|
||||||
|
#define UTILITY_MINOR_VERSION 11
|
||||||
|
|
||||||
//
|
//
|
||||||
// Define the max length of a filename
|
// Define the max length of a filename
|
||||||
@ -81,6 +82,12 @@ static STRING_LOOKUP mSubsystemTypes[] = {
|
|||||||
//
|
//
|
||||||
// Function prototypes
|
// Function prototypes
|
||||||
//
|
//
|
||||||
|
static
|
||||||
|
void
|
||||||
|
Version (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
Usage (
|
Usage (
|
||||||
@ -489,6 +496,22 @@ Returns:
|
|||||||
Argc--;
|
Argc--;
|
||||||
Argv++;
|
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) {
|
if (Argc != 2) {
|
||||||
Usage ();
|
Usage ();
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
@ -506,6 +529,17 @@ Returns:
|
|||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static
|
||||||
void
|
void
|
||||||
Usage (
|
Usage (
|
||||||
@ -529,15 +563,14 @@ Returns:
|
|||||||
{
|
{
|
||||||
int Index;
|
int Index;
|
||||||
static const char *Msg[] = {
|
static const char *Msg[] = {
|
||||||
UTILITY_NAME " version "UTILITY_VERSION " - Generate ACPI Table image utility",
|
"\nUsage: "UTILITY_NAME " {-h|--help|-?|/?|-V|--version} InFileName OutFileName",
|
||||||
" Generate an ACPI Table image from an EFI PE32 image",
|
" where:",
|
||||||
" Usage: "UTILITY_NAME " InFileName OutFileName",
|
" InFileName - name of the input PE32 file",
|
||||||
" where:",
|
" OutFileName - to write output to OutFileName rather than InFileName"DEFAULT_OUTPUT_EXTENSION,
|
||||||
" InFileName - name of the input PE32 file",
|
|
||||||
" OutFileName - to write output to OutFileName rather than InFileName"DEFAULT_OUTPUT_EXTENSION,
|
|
||||||
"",
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Version();
|
||||||
for (Index = 0; Msg[Index] != NULL; Index++) {
|
for (Index = 0; Msg[Index] != NULL; Index++) {
|
||||||
fprintf (stdout, "%s\n", Msg[Index]);
|
fprintf (stdout, "%s\n", Msg[Index]);
|
||||||
}
|
}
|
||||||
|
@ -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
|
This software and associated documentation (if any) is furnished
|
||||||
under a license and may only be used or copied in accordance
|
under a license and may only be used or copied in accordance
|
||||||
with the terms of the license. Except as permitted by such
|
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
|
// A lot of the file-header stuff has been ported, but
|
||||||
// not the section information.
|
// not the section information.
|
||||||
//
|
//
|
||||||
#define TOOLVERSION "0.1"
|
|
||||||
|
#define UTILITY_NAME "GenBsfFixup"
|
||||||
|
#define UTILITY_MAJOR_VERSION 0
|
||||||
|
#define UTILITY_MINOR_VERSION 1
|
||||||
|
|
||||||
UINT32 gFixup;
|
UINT32 gFixup;
|
||||||
|
|
||||||
@ -78,6 +81,26 @@ Returns:
|
|||||||
return OccupiedSize;
|
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
|
int
|
||||||
ReadHeader (
|
ReadHeader (
|
||||||
FILE *In,
|
FILE *In,
|
||||||
@ -370,14 +393,25 @@ Returns:
|
|||||||
|
|
||||||
Index = 0;
|
Index = 0;
|
||||||
Invert = 0;
|
Invert = 0;
|
||||||
printf (
|
|
||||||
"GenBsfFixup EFI 2.0. Version %s, %s\n""Copyright (c) 2000-2001, Intel Corporation\n\n",
|
if (argc < 1) {
|
||||||
TOOLVERSION,
|
Usage();
|
||||||
__DATE__
|
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) {
|
if (argc != 5) {
|
||||||
printf ("Usage:\n"" GenBsfFixup FvVolumeImageFile AddressOfFvInMemory OffsetOfFixup OutputFileName\n");
|
Usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2357,7 +2357,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
PrintUtilityInfo (
|
Version (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -2377,16 +2377,15 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
printf (
|
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_NAME,
|
||||||
UTILITY_MAJOR_VERSION,
|
UTILITY_MAJOR_VERSION,
|
||||||
UTILITY_MINOR_VERSION,
|
UTILITY_MINOR_VERSION
|
||||||
UTILITY_DATE
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
PrintUsage (
|
Usage (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -2405,13 +2404,16 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
|
Version();
|
||||||
|
|
||||||
printf (
|
printf (
|
||||||
"Usage: %s -B BaseAddress -S FwVolumeSize\n",
|
"\nUsage: %s -B BaseAddress -S FwVolumeSize\n",
|
||||||
UTILITY_NAME
|
UTILITY_NAME
|
||||||
);
|
);
|
||||||
printf (" Where:\n");
|
printf (" Where:\n");
|
||||||
printf ("\tBaseAddress is the starting address of Firmware Volume where\n\tBoot Strapped Image will reside.\n\n");
|
printf (" BaseAddress is the starting address of Firmware Volume where Boot\n");
|
||||||
printf ("\tFwVolumeSize is the size of Firmware Volume.\n\n");
|
printf (" Strapped Image will reside.\n");
|
||||||
|
printf (" FwVolumeSize is the size of Firmware Volume.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -2454,11 +2456,6 @@ Returns:
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
BOOLEAN IsIA32;
|
BOOLEAN IsIA32;
|
||||||
|
|
||||||
//
|
|
||||||
// Display utility information
|
|
||||||
//
|
|
||||||
PrintUtilityInfo ();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Verify the correct number of IA32 arguments
|
// Verify the correct number of IA32 arguments
|
||||||
//
|
//
|
||||||
@ -2486,7 +2483,7 @@ Returns:
|
|||||||
// Make sure argument pair begin with - or /
|
// Make sure argument pair begin with - or /
|
||||||
//
|
//
|
||||||
if (argv[Index][0] != '-' && argv[Index][0] != '/') {
|
if (argv[Index][0] != '-' && argv[Index][0] != '/') {
|
||||||
PrintUsage ();
|
Usage ();
|
||||||
printf ("ERROR: Argument pair must begin with \"-\" or \"/\"\n");
|
printf ("ERROR: Argument pair must begin with \"-\" or \"/\"\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -2495,7 +2492,7 @@ Returns:
|
|||||||
// Make sure argument specifier is only one letter
|
// Make sure argument specifier is only one letter
|
||||||
//
|
//
|
||||||
if (argv[Index][2] != 0) {
|
if (argv[Index][2] != 0) {
|
||||||
PrintUsage ();
|
Usage ();
|
||||||
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
|
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -2515,7 +2512,7 @@ Returns:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PrintUsage ();
|
Usage ();
|
||||||
printf ("Unrecognized IA32 argument \"%s\".\n", argv[Index]);
|
printf ("Unrecognized IA32 argument \"%s\".\n", argv[Index]);
|
||||||
IsIA32 = FALSE;
|
IsIA32 = FALSE;
|
||||||
break;
|
break;
|
||||||
@ -2562,8 +2559,24 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Verify the correct number of arguments
|
// 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) {
|
if (argc != ONE_BSF_ARGS && argc != TWO_BSF_ARGS) {
|
||||||
PrintUsage ();
|
Usage ();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2586,7 +2599,7 @@ Returns:
|
|||||||
// Make sure argument pair begin with - or /
|
// Make sure argument pair begin with - or /
|
||||||
//
|
//
|
||||||
if (argv[Index][0] != '-' && argv[Index][0] != '/') {
|
if (argv[Index][0] != '-' && argv[Index][0] != '/') {
|
||||||
PrintUsage ();
|
Usage ();
|
||||||
printf ("ERROR: Argument pair must begin with \"-\" or \"/\"\n");
|
printf ("ERROR: Argument pair must begin with \"-\" or \"/\"\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -2595,7 +2608,7 @@ Returns:
|
|||||||
// Make sure argument specifier is only one letter
|
// Make sure argument specifier is only one letter
|
||||||
//
|
//
|
||||||
if (argv[Index][2] != 0) {
|
if (argv[Index][2] != 0) {
|
||||||
PrintUsage ();
|
Usage ();
|
||||||
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
|
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -2636,7 +2649,7 @@ Returns:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PrintUsage ();
|
Usage ();
|
||||||
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
|
printf ("ERROR: Unrecognized argument \"%s\".\n", argv[Index]);
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
@ -128,7 +128,7 @@ Abstract:
|
|||||||
// Utility version information
|
// Utility version information
|
||||||
//
|
//
|
||||||
#define UTILITY_MAJOR_VERSION 0
|
#define UTILITY_MAJOR_VERSION 0
|
||||||
#define UTILITY_MINOR_VERSION 0
|
#define UTILITY_MINOR_VERSION 1
|
||||||
#define UTILITY_DATE __DATE__
|
#define UTILITY_DATE __DATE__
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -86,7 +86,7 @@ ParseDepex (
|
|||||||
);
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
GDVersion (
|
Version (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -115,7 +115,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
GDUsage (
|
Usage (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -134,9 +134,9 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
GDVersion();
|
Version();
|
||||||
printf (
|
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
|
UTILITY_NAME
|
||||||
);
|
);
|
||||||
printf (" Where:\n");
|
printf (" Where:\n");
|
||||||
@ -857,24 +857,24 @@ Returns:
|
|||||||
Pad_Flag = FALSE;
|
Pad_Flag = FALSE;
|
||||||
|
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
GDUsage();
|
Usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
||||||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
||||||
GDUsage();
|
Usage();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
|
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
|
||||||
GDVersion();
|
Version();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc < 5) {
|
if (argc < 5) {
|
||||||
printf ("Not enough arguments\n");
|
printf ("Not enough arguments\n");
|
||||||
GDUsage();
|
Usage();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -920,13 +920,13 @@ Returns:
|
|||||||
|
|
||||||
if (InFile == NULL) {
|
if (InFile == NULL) {
|
||||||
printf ("Can not open <INFILE> for reading.\n");
|
printf ("Can not open <INFILE> for reading.\n");
|
||||||
GDUsage();
|
Usage();
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OutFile == NULL) {
|
if (OutFile == NULL) {
|
||||||
printf ("Can not open <OUTFILE> for writting.\n");
|
printf ("Can not open <OUTFILE> for writting.\n");
|
||||||
GDUsage();
|
Usage();
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MIUsage(
|
Usage(
|
||||||
void
|
void
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -291,7 +291,7 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
MIVersion();
|
MIVersion();
|
||||||
printf ("\n Usage: %s InputFile OutputFile Pattern_String [Pattern_String <20><>]\n\
|
printf ("\nUsage: %s InputFile OutputFile Pattern_String [Pattern_String <20><>]\n\
|
||||||
Where: \n\
|
Where: \n\
|
||||||
Pattern_String is of the format (note that the section name must be \n\
|
Pattern_String is of the format (note that the section name must be \n\
|
||||||
enclosed within square brackets):\n\
|
enclosed within square brackets):\n\
|
||||||
@ -334,13 +334,13 @@ Returns:
|
|||||||
FILE *fpout;
|
FILE *fpout;
|
||||||
|
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
MIUsage();
|
Usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
||||||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
||||||
MIUsage();
|
Usage();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
MIUsage();
|
Usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ Abstract:
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
StripVersion(
|
Version(
|
||||||
void
|
void
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -55,7 +55,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
StripUsage(
|
Usage(
|
||||||
void
|
void
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
@ -74,8 +74,8 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
StripVersion();
|
Version();
|
||||||
printf ("\n Usage: %s InputFile OutputFile\n", UTILITY_NAME);
|
printf ("\nUsage: %s InputFile OutputFile\n", UTILITY_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -109,23 +109,23 @@ Returns:
|
|||||||
char *Ptrx;
|
char *Ptrx;
|
||||||
|
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
StripUsage();
|
Usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||
|
||||||
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
(strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {
|
||||||
StripUsage();
|
Usage();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
|
if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {
|
||||||
StripVersion();
|
Version();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
StripUsage();
|
Usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user