diff options
author | Eric Dong <eric.dong@intel.com> | 2014-08-01 04:44:16 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-01 04:44:16 +0000 |
commit | cebd6ef9048067ab53ab03e344f9df2cb506080d (patch) | |
tree | 330d435979904a08f425a6ab2f5e7d69551432ff /BaseTools | |
parent | 46737a64d0e8f5dcc525973d3313f95920155265 (diff) | |
download | edk2-platforms-cebd6ef9048067ab53ab03e344f9df2cb506080d.tar.xz |
Support --version command line for VfrCompile
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15733 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/C/VfrCompile/VfrCompiler.cpp | 20 | ||||
-rw-r--r-- | BaseTools/Source/C/VfrCompile/VfrCompiler.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp index ee10605edb..bb2df3ed39 100644 --- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp @@ -96,6 +96,10 @@ CVfrCompiler::OptionInitialization ( Usage ();
SET_RUN_STATUS (STATUS_DEAD);
return;
+ } else if (stricmp(Argv[Index], "--version") == 0) {
+ Version ();
+ SET_RUN_STATUS (STATUS_DEAD);
+ return;
} else if (stricmp(Argv[Index], "-l") == 0) {
mOptions.CreateRecordListFile = TRUE;
gCIfrRecordInfoDB.TurnOn ();
@@ -415,6 +419,7 @@ CVfrCompiler::Usage ( " ",
"Options:",
" -h, --help prints this help",
+ " --version prints version info",
" -l create an output IFR listing file",
" -o DIR, --output-directory DIR",
" deposit all output files to directory OutputDir",
@@ -439,6 +444,21 @@ CVfrCompiler::Usage ( }
}
+VOID
+CVfrCompiler::Version (
+ VOID
+ )
+{
+ UINT32 Index;
+ CONST CHAR8 *Help[] = {
+ "VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION,
+ NULL
+ };
+ for (Index = 0; Help[Index] != NULL; Index++) {
+ fprintf (stdout, "%s\n", Help[Index]);
+ }
+}
+
VOID
CVfrCompiler::PreProcess (
VOID
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.h b/BaseTools/Source/C/VfrCompile/VfrCompiler.h index 3261e9ccdb..6a6779c0ca 100644 --- a/BaseTools/Source/C/VfrCompile/VfrCompiler.h +++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.h @@ -100,6 +100,7 @@ public: ~CVfrCompiler ();
VOID Usage (VOID);
+ VOID Version (VOID);
VOID PreProcess (VOID);
VOID Compile (VOID);
|