+from Common.LongFilePathSupport import OpenLongFilePath as open\r
+\r
+## MultipleFv() class\r
+#\r
+# A class for Multiple FV\r
+#\r
+class MultipleFv(FirmwareVolume):\r
+ def __init__(self, FvList):\r
+ FirmwareVolume.__init__(self)\r
+ self.BasicInfo = []\r
+ for FvPath in FvList:\r
+ FvName = os.path.splitext(os.path.split(FvPath)[1])[0]\r
+ Fd = open(FvPath, 'rb')\r
+ Buf = array('B')\r
+ try:\r
+ Buf.fromfile(Fd, os.path.getsize(FvPath))\r
+ except EOFError:\r
+ pass\r
+\r
+ Fv = FirmwareVolume(FvName)\r
+ Fv.frombuffer(Buf, 0, len(Buf))\r
+\r
+ self.BasicInfo.append([Fv.Name, Fv.FileSystemGuid, Fv.Size])\r
+ self.FfsDict.append(Fv.FfsDict) \r