diff options
author | ywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-03 22:09:16 +0000 |
---|---|---|
committer | ywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-03 22:09:16 +0000 |
commit | 52be9a3b672c5592bccc6580c3bb0f509b278e22 (patch) | |
tree | 2fb08f4b280ea6aa59d6c2621c2e342d717fb27a /Tools/CCode/Source/GenCRC32Section | |
parent | 67fca228ca421c164120f639e18cc0ecff6c1652 (diff) | |
download | edk2-platforms-52be9a3b672c5592bccc6580c3bb0f509b278e22.tar.xz |
Added or modified utility version and usage display.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2162 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/CCode/Source/GenCRC32Section')
-rw-r--r-- | Tools/CCode/Source/GenCRC32Section/GenCRC32Section.c | 64 |
1 files changed, 52 insertions, 12 deletions
diff --git a/Tools/CCode/Source/GenCRC32Section/GenCRC32Section.c b/Tools/CCode/Source/GenCRC32Section/GenCRC32Section.c index b99cf2f816..5c9af78181 100644 --- a/Tools/CCode/Source/GenCRC32Section/GenCRC32Section.c +++ b/Tools/CCode/Source/GenCRC32Section/GenCRC32Section.c @@ -1,6 +1,6 @@ /*++
-Copyright (c) 2004, Intel Corporation
+Copyright (c) 2004-2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -22,9 +22,9 @@ Abstract: #include "GenCRC32Section.h"
-#define TOOLVERSION "0.2"
-
-#define UTILITY_NAME "GenCrc32Section"
+#define UTILITY_NAME "GenCrc32Section"
+#define UTILITY_MAJOR_VERSION 0
+#define UTILITY_MINOR_VERSION 2
EFI_GUID gEfiCrc32SectionGuid = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;
@@ -117,16 +117,45 @@ Returns: }
VOID
-PrintUsage (
+Version (
VOID
)
+/*++
+
+Routine Description:
+
+ Displays the standard utility information to SDTOUT
+
+Arguments:
+
+ None
+
+Returns:
+
+ None
+
+--*/
{
- printf ("Usage:\n");
- printf (UTILITY_NAME " -i \"inputfile1\" \"inputfile2\" -o \"outputfile\" \n");
- printf (" -i \"inputfile\":\n ");
- printf (" specifies the input files that would be signed to CRC32 Guided section.\n");
- printf (" -o \"outputfile\":\n");
- printf (" specifies the output file that is a CRC32 Guided section.\n");
+ printf (
+ "%s v%d.%d -Utility for generating Firmware File System files.\n",
+ UTILITY_NAME,
+ UTILITY_MAJOR_VERSION,
+ UTILITY_MINOR_VERSION
+ );
+}
+
+
+VOID
+Usage (
+ VOID
+ )
+{
+ Version();
+
+ printf ("\nUsage:\n");
+ printf (UTILITY_NAME " -i Inputfile1 Inputfile2 -o Outputfile\n");
+ printf (" -i Inputfile: specifies the input files signed to CRC32 Guided section.\n");
+ printf (" -o Outputfile: specifies the output file that is a CRC32 Guided section.\n");
}
INT32
@@ -211,8 +240,19 @@ main ( SetUtilityName (UTILITY_NAME);
+ 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 == 1) {
- PrintUsage ();
+ Usage ();
return -1;
}
|