]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/CapsuleData.py
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / CapsuleData.py
index db29737963d1fb49600cbd53690345612d188555..85307b90c647624dcd6d788d443c66783cfc8781 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
 # generate capsule\r
 #\r
-#  Copyright (c) 2007, Intel Corporation\r
+#  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
 #\r
-#  All rights reserved. This program and the accompanying materials\r
+#  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
@@ -45,6 +45,7 @@ class CapsuleFfs (CapsuleData):
     #\r
     def __init_(self) :\r
         self.Ffs = None\r
+        self.FvName = None\r
 \r
     ## generate FFS capsule data\r
     #\r
@@ -64,7 +65,9 @@ class CapsuleFv (CapsuleData):
     #   @param  self        The object pointer\r
     #\r
     def __init__(self) :\r
+        self.Ffs = None\r
         self.FvName = None\r
+        self.CapsuleName = None\r
 \r
     ## generate FV capsule data\r
     #\r
@@ -76,9 +79,11 @@ class CapsuleFv (CapsuleData):
             if self.FvName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FvDict.keys():\r
                 FvObj = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName.upper())\r
                 FdBuffer = StringIO.StringIO('')\r
+                FvObj.CapsuleName = self.CapsuleName\r
                 FvFile = FvObj.AddToBuffer(FdBuffer)\r
+                FvObj.CapsuleName = None\r
+                FdBuffer.close()\r
                 return FvFile\r
-            \r
         else:\r
             FvFile = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FvName)\r
             return FvFile\r