#include "SecFixup.h"\r
\r
VOID\r
-PrintUtilityInfo (\r
+Version (\r
VOID\r
)\r
/*++\r
\r
--*/\r
{\r
- printf (\r
- "%s - Tiano IA32 SEC Fixup Utility."" Version %i.%i\n\n",\r
- UTILITY_NAME,\r
- UTILITY_MAJOR_VERSION,\r
- UTILITY_MINOR_VERSION\r
- );\r
+ printf ("%s v%d.%d -Tiano IA32 SEC Fixup Utility.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);\r
+ printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");\r
}\r
\r
VOID\r
-PrintUsage (\r
+Usage (\r
VOID\r
)\r
/*++\r
\r
--*/\r
{\r
- printf ("Usage: %s SecExeFile ResetVectorDataFile OutputFile\n", UTILITY_NAME);\r
+ Version();\r
+ \r
+ printf ("\nUsage: %s SecExeFile ResetVectorDataFile OutputFile\n", UTILITY_NAME);\r
printf (" Where:\n");\r
- printf ("\tSecExeFile - Name of the IA32 SEC EXE file.\n");\r
- printf ("\tResetVectorDataFile - Name of the reset vector data binary file.\n");\r
- printf ("\tOutputFileName - Name of the output file.\n\n");\r
+ printf (" SecExeFile - Name of the IA32 SEC EXE file.\n");\r
+ printf (" ResetVectorDataFile - Name of the reset vector data binary file.\n");\r
+ printf (" OutputFileName - Name of the output file.\n");\r
}\r
\r
STATUS\r
\r
SetUtilityName (UTILITY_NAME);\r
\r
- //\r
- // Display utility information\r
- //\r
- PrintUtilityInfo ();\r
-\r
+ if (argc == 1) {\r
+ Usage();\r
+ return STATUS_ERROR;\r
+ }\r
+ \r
+ if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0) ||\r
+ (strcmp(argv[1], "-?") == 0) || (strcmp(argv[1], "/?") == 0)) {\r
+ Usage();\r
+ return STATUS_ERROR;\r
+ }\r
+ \r
+ if ((strcmp(argv[1], "-V") == 0) || (strcmp(argv[1], "--version") == 0)) {\r
+ Version();\r
+ return STATUS_ERROR;\r
+ }\r
+ \r
//\r
// Verify the correct number of arguments\r
//\r
if (argc != MAX_ARGS) {\r
Error (NULL, 0, 0, "invalid number of input parameters specified", NULL);\r
- PrintUsage ();\r
+ Usage ();\r
return STATUS_ERROR;\r
}\r
//\r