mirror of https://github.com/acidanthera/audk.git
Modified the version and usage display.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2263 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
243009a7bf
commit
26355eed43
|
@ -24,8 +24,35 @@ Abstract:
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define UTILITY_NAME "GenTEImage"
|
||||||
|
#define UTILITY_MAJOR_VERSION 0
|
||||||
|
#define UTILITY_MINOR_VERSION 1
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintUsage (
|
Version (
|
||||||
|
void
|
||||||
|
)
|
||||||
|
/*++
|
||||||
|
Routine Description:
|
||||||
|
print version information for this utility
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
None
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
None
|
||||||
|
--*/
|
||||||
|
// GC_TODO: void - add argument and description to function comment
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// print usage of command
|
||||||
|
//
|
||||||
|
printf ("%s v%d.%d -Utility to zero the Debug Data Fields of Portable Executable (PE) format file.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
|
||||||
|
printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Usage (
|
||||||
void
|
void
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
@ -40,6 +67,7 @@ Returns:
|
||||||
--*/
|
--*/
|
||||||
// GC_TODO: void - add argument and description to function comment
|
// GC_TODO: void - add argument and description to function comment
|
||||||
{
|
{
|
||||||
|
Version();
|
||||||
//
|
//
|
||||||
// print usage of command
|
// print usage of command
|
||||||
//
|
//
|
||||||
|
@ -334,13 +362,27 @@ Returns:
|
||||||
FILE *fpData;
|
FILE *fpData;
|
||||||
char DataFile[1024] = "";
|
char DataFile[1024] = "";
|
||||||
|
|
||||||
//
|
if (argc == 1) {
|
||||||
// check the number of parameters
|
Usage();
|
||||||
//
|
|
||||||
if (argc < 2) {
|
|
||||||
printf ("\nUsage: ZeroDebugData <PE-File> [DebugData-File]\n");
|
|
||||||
return -1;
|
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 == 2) {
|
||||||
|
Usage();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// open the DebugData file, if not exists, return
|
// open the DebugData file, if not exists, return
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue