summaryrefslogtreecommitdiff
path: root/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
diff options
context:
space:
mode:
authorywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-02 20:17:36 +0000
committerywang <ywang@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-02 20:17:36 +0000
commitf091efb3cb895692a55c310c368943bb4c108ba1 (patch)
tree51e140f919c4a6c0f6172549038b6c4cbdd24087 /Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
parenta3ab2a47d9ecb2295802726fd17f048c14519aab (diff)
downloadedk2-platforms-f091efb3cb895692a55c310c368943bb4c108ba1.tar.xz
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
Diffstat (limited to 'Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c')
-rw-r--r--Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c52
1 files changed, 43 insertions, 9 deletions
diff --git a/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c b/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
index 462f97fa83..1cc1e83389 100644
--- a/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
+++ b/Tools/CCode/Source/GenBsfFixup/GenBsfFixup.c
@@ -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
under a license and may only be used or copied in accordance
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
// not the section information.
//
-#define TOOLVERSION "0.1"
+
+#define UTILITY_NAME "GenBsfFixup"
+#define UTILITY_MAJOR_VERSION 0
+#define UTILITY_MINOR_VERSION 1
UINT32 gFixup;
@@ -78,6 +81,26 @@ Returns:
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
ReadHeader (
FILE *In,
@@ -370,14 +393,25 @@ Returns:
Index = 0;
Invert = 0;
- printf (
- "GenBsfFixup EFI 2.0. Version %s, %s\n""Copyright (c) 2000-2001, Intel Corporation\n\n",
- TOOLVERSION,
- __DATE__
- );
-
+
+ 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 != 5) {
- printf ("Usage:\n"" GenBsfFixup FvVolumeImageFile AddressOfFvInMemory OffsetOfFixup OutputFileName\n");
+ Usage();
return -1;
}