diff options
author | ywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-10 21:00:22 +0000 |
---|---|---|
committer | ywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-10 21:00:22 +0000 |
commit | eaad41e8921f5edd14d9cf13d424248b8ba5cf4d (patch) | |
tree | 908cd2b0edf354fd82932c331fde993f3a9511a0 /Tools | |
parent | fd23b925fbc72e96c85082a042932e4eb370d735 (diff) | |
download | edk2-platforms-eaad41e8921f5edd14d9cf13d424248b8ba5cf4d.tar.xz |
Modified utility usage and version display.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2210 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/CCode/Source/SecFixup/SecFixup.c | 45 | ||||
-rw-r--r-- | Tools/CCode/Source/SecFixup/SecFixup.h | 4 |
2 files changed, 29 insertions, 20 deletions
diff --git a/Tools/CCode/Source/SecFixup/SecFixup.c b/Tools/CCode/Source/SecFixup/SecFixup.c index c2d46a1d5c..5a36cdff5e 100644 --- a/Tools/CCode/Source/SecFixup/SecFixup.c +++ b/Tools/CCode/Source/SecFixup/SecFixup.c @@ -36,7 +36,7 @@ Abstract: #include "SecFixup.h"
VOID
-PrintUtilityInfo (
+Version (
VOID
)
/*++
@@ -55,16 +55,12 @@ Returns: --*/
{
- printf (
- "%s - Tiano IA32 SEC Fixup Utility."" Version %i.%i\n\n",
- UTILITY_NAME,
- UTILITY_MAJOR_VERSION,
- UTILITY_MINOR_VERSION
- );
+ printf ("%s v%d.%d -Tiano IA32 SEC Fixup Utility.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
+ printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");
}
VOID
-PrintUsage (
+Usage (
VOID
)
/*++
@@ -83,11 +79,13 @@ Returns: --*/
{
- printf ("Usage: %s SecExeFile ResetVectorDataFile OutputFile\n", UTILITY_NAME);
+ Version();
+
+ printf ("\nUsage: %s SecExeFile ResetVectorDataFile OutputFile\n", UTILITY_NAME);
printf (" Where:\n");
- printf ("\tSecExeFile - Name of the IA32 SEC EXE file.\n");
- printf ("\tResetVectorDataFile - Name of the reset vector data binary file.\n");
- printf ("\tOutputFileName - Name of the output file.\n\n");
+ printf (" SecExeFile - Name of the IA32 SEC EXE file.\n");
+ printf (" ResetVectorDataFile - Name of the reset vector data binary file.\n");
+ printf (" OutputFileName - Name of the output file.\n");
}
STATUS
@@ -122,17 +120,28 @@ Returns: SetUtilityName (UTILITY_NAME);
- //
- // Display utility information
- //
- PrintUtilityInfo ();
-
+ 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;
+ }
+
//
// Verify the correct number of arguments
//
if (argc != MAX_ARGS) {
Error (NULL, 0, 0, "invalid number of input parameters specified", NULL);
- PrintUsage ();
+ Usage ();
return STATUS_ERROR;
}
//
diff --git a/Tools/CCode/Source/SecFixup/SecFixup.h b/Tools/CCode/Source/SecFixup/SecFixup.h index 3694b1516a..9d26656c5f 100644 --- a/Tools/CCode/Source/SecFixup/SecFixup.h +++ b/Tools/CCode/Source/SecFixup/SecFixup.h @@ -47,7 +47,7 @@ Abstract: // The function that displays general utility information
//
VOID
-PrintUtilityInfo (
+Version (
VOID
)
/*++
@@ -71,7 +71,7 @@ Returns: // The function that displays the utility usage message.
//
VOID
-PrintUsage (
+Usage (
VOID
)
/*++
|