From 08dd311f5dc735c595d39faf2e6f7e2810bb79a9 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 11 Oct 2010 06:26:52 +0000 Subject: Sync EDKII BaseTools to BaseTools project r2065. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10915 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/Common/VpdInfoFile.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'BaseTools/Source/Python/Common/VpdInfoFile.py') diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py index 0111744cc0..5f92fa5cdd 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -219,28 +219,23 @@ class VpdInfoFile: # @param ToolPath The string path name for BPDG tool # @param VpdFileName The string path name for VPD information guid.txt # -def CallExtenalBPDGTool(ToolPath, VpdFilePath, VpdFileName): +def CallExtenalBPDGTool(ToolPath, VpdFileName): assert ToolPath != None, "Invalid parameter ToolPath" - assert VpdFilePath != None and os.path.exists(VpdFilePath), "Invalid parameter VpdFileName" + assert VpdFileName != None and os.path.exists(VpdFileName), "Invalid parameter VpdFileName" - OutputDir = os.path.dirname(VpdFilePath) - if (VpdFileName == None or VpdFileName == "") : - FileName = os.path.basename(VpdFilePath) - BaseName, ext = os.path.splitext(FileName) - OutputMapFileName = os.path.join(OutputDir, "%s.map" % BaseName) - OutputBinFileName = os.path.join(OutputDir, "%s.bin" % BaseName) - else : - OutputMapFileName = os.path.join(OutputDir, "%s.map" % VpdFileName) - OutputBinFileName = os.path.join(OutputDir, "%s.bin" % VpdFileName) + OutputDir = os.path.dirname(VpdFileName) + FileName = os.path.basename(VpdFileName) + BaseName, ext = os.path.splitext(FileName) + OutputMapFileName = os.path.join(OutputDir, "%s.map" % BaseName) + OutputBinFileName = os.path.join(OutputDir, "%s.bin" % BaseName) try: PopenObject = subprocess.Popen([ToolPath, '-o', OutputBinFileName, '-m', OutputMapFileName, - '-s', + '-q', '-f', - '-v', - VpdFilePath], + VpdFileName], stdout=subprocess.PIPE, stderr= subprocess.PIPE) except Exception, X: -- cgit v1.2.3