properly support GCC - pass 'I' (int) rather than 'L' (long) to struct.unpack.
authorYao, Jiewen <jiewen.yao@intel.com>
Thu, 4 Dec 2014 06:01:15 +0000 (06:01 +0000)
committerjyao1 <jyao1@Edk2>
Thu, 4 Dec 2014 06:01:15 +0000 (06:01 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16474 6f19259b-4bc3-4df7-8a09-765794883524

IntelFspPkg/Tools/GenCfgOpt.py

index 4417bc3..78b330a 100644 (file)
@@ -615,7 +615,7 @@ EndList
                 BinFd = open(BinFile, "rb")\r
                 IdStr    = BinFd.read(0x08)\r
                 ImageId  = struct.unpack('Q', IdStr)\r
-                ImageRev = struct.unpack('L', BinFd.read(0x04))\r
+                ImageRev = struct.unpack('I', BinFd.read(0x04))\r
                 BinFd.close()\r
 \r
                 HeaderFd.write("#define VPD_IMAGE_ID    0x%016X        /* '%s' */\n" % (ImageId[0], IdStr))\r