]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/Region.py
Add support for ${s_*} and ${d_*} macros for in FDF file for the INF files, and for...
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / Region.py
index bfa65c805484c9f40569128d264612309b8121d8..15b2ecba906aff51a3c2c6eb31d3eec366785867 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process FD Region generation\r
 #\r
-#  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -19,10 +19,11 @@ from struct import *
 from GenFdsGlobalVariable import GenFdsGlobalVariable\r
 import StringIO\r
 from CommonDataClass.FdfClass import RegionClassObject\r
-import os\r
+import Common.LongFilePathOs as os\r
 from stat import *\r
 from Common import EdkLogger\r
 from Common.BuildToolError import *\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## generate Region\r
 #\r
@@ -216,7 +217,7 @@ class Region(RegionClassObject):
                                     "Size of File (%s) is larger than Region Size 0x%X specified." \\r
                                     % (RegionData, Size))\r
                 GenFdsGlobalVariable.InfLogger('   Region File Name = %s'%RegionData)\r
-                BinFile = open (RegionData, 'r+b')\r
+                BinFile = open (RegionData, 'rb')\r
                 Buffer.write(BinFile.read())\r
                 BinFile.close()\r
                 Size = Size - FileLength\r