diff options
author | Hess Chen <hesheng.chen@intel.com> | 2014-08-15 03:06:48 +0000 |
---|---|---|
committer | hchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-15 03:06:48 +0000 |
commit | 1be2ed90a20618d71ddf34b8a07d038da0b36854 (patch) | |
tree | 468f6ad18b924e3a58c180403f96d5afcd47a4f9 /BaseTools/Source/Python/Ecc | |
parent | b8a13d736961faff0d11241a0428abc44a084d6e (diff) | |
download | edk2-1be2ed90a20618d71ddf34b8a07d038da0b36854.zip edk2-1be2ed90a20618d71ddf34b8a07d038da0b36854.tar.gz edk2-1be2ed90a20618d71ddf34b8a07d038da0b36854.tar.bz2 |
There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Ecc')
-rw-r--r-- | BaseTools/Source/Python/Ecc/Check.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/CodeFragmentCollector.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/Configuration.py | 3 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/Database.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/Ecc.py | 3 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/EccGlobalData.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/Exception.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/FileProfile.py | 5 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/MetaDataParser.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 5 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py | 3 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/c.py | 4 |
13 files changed, 28 insertions, 23 deletions
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py index c1ac07e..4e7ffe7 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -1,7 +1,7 @@ ## @file
# This file is used to define checkpoints used by ECC tool
#
-# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -10,7 +10,7 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
-import os
+import Common.LongFilePathOs as os
import re
from CommonDataClass.DataClass import *
from Common.DataType import SUP_MODULE_LIST_STRING, TAB_VALUE_SPLIT
diff --git a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py index 134b15f..171600f 100644 --- a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py +++ b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py @@ -1,7 +1,7 @@ ## @file
# preprocess source file
#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -17,7 +17,7 @@ #
import re
-import os
+import Common.LongFilePathOs as os
import sys
import antlr3
diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Source/Python/Ecc/Configuration.py index 4f93d79..72bfbc7 100644 --- a/BaseTools/Source/Python/Ecc/Configuration.py +++ b/BaseTools/Source/Python/Ecc/Configuration.py @@ -14,10 +14,11 @@ ##
# Import Modules
#
-import os
+import Common.LongFilePathOs as os
import Common.EdkLogger as EdkLogger
from Common.DataType import *
from Common.String import *
+from Common.LongFilePathSupport import OpenLongFilePath as open
## Configuration
#
diff --git a/BaseTools/Source/Python/Ecc/Database.py b/BaseTools/Source/Python/Ecc/Database.py index f3e2b59..2041175 100644 --- a/BaseTools/Source/Python/Ecc/Database.py +++ b/BaseTools/Source/Python/Ecc/Database.py @@ -1,7 +1,7 @@ ## @file
# This file is used to create a database used by ECC tool
#
-# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -15,7 +15,7 @@ # Import Modules
#
import sqlite3
-import os, time
+import Common.LongFilePathOs as os, time
import Common.EdkLogger as EdkLogger
import CommonDataClass.DataClass as DataClass
diff --git a/BaseTools/Source/Python/Ecc/Ecc.py b/BaseTools/Source/Python/Ecc/Ecc.py index b5d733e..72f22d5 100644 --- a/BaseTools/Source/Python/Ecc/Ecc.py +++ b/BaseTools/Source/Python/Ecc/Ecc.py @@ -14,7 +14,7 @@ ##
# Import Modules
#
-import os, time, glob, sys
+import Common.LongFilePathOs as os, time, glob, sys
import Common.EdkLogger as EdkLogger
import Database
import EccGlobalData
@@ -37,6 +37,7 @@ from MetaFileWorkspace.MetaFileTable import MetaFileStorage import c
import re, string
from Exception import *
+from Common.LongFilePathSupport import OpenLongFilePath as open
## Ecc
#
diff --git a/BaseTools/Source/Python/Ecc/EccGlobalData.py b/BaseTools/Source/Python/Ecc/EccGlobalData.py index 5226e4a..a20d6ea 100644 --- a/BaseTools/Source/Python/Ecc/EccGlobalData.py +++ b/BaseTools/Source/Python/Ecc/EccGlobalData.py @@ -1,7 +1,7 @@ ## @file
# This file is used to save global datas used by ECC tool
#
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -14,7 +14,7 @@ ##
# Import Modules
#
-import os
+import Common.LongFilePathOs as os
gWorkspace = ''
gTarget = ''
diff --git a/BaseTools/Source/Python/Ecc/Exception.py b/BaseTools/Source/Python/Ecc/Exception.py index ffbb62b..fffbf30 100644 --- a/BaseTools/Source/Python/Ecc/Exception.py +++ b/BaseTools/Source/Python/Ecc/Exception.py @@ -1,7 +1,7 @@ ## @file
# This file is used to parse exception items found by ECC tool
#
-# Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -15,7 +15,7 @@ # Import Modules
#
from Xml.XmlRoutines import *
-import os.path
+import Common.LongFilePathOs as os
# ExceptionXml to parse Exception Node of XML file
class ExceptionXml(object):
diff --git a/BaseTools/Source/Python/Ecc/FileProfile.py b/BaseTools/Source/Python/Ecc/FileProfile.py index 689aee0..f31d37f 100644 --- a/BaseTools/Source/Python/Ecc/FileProfile.py +++ b/BaseTools/Source/Python/Ecc/FileProfile.py @@ -1,7 +1,7 @@ ## @file
# fragments of source file
#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -17,8 +17,9 @@ #
import re
-import os
+import Common.LongFilePathOs as os
from ParserWarning import Warning
+from Common.LongFilePathSupport import OpenLongFilePath as open
CommentList = []
PPDirectiveList = []
diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py b/BaseTools/Source/Python/Ecc/MetaDataParser.py index bbafa00..98b16a0 100644 --- a/BaseTools/Source/Python/Ecc/MetaDataParser.py +++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py @@ -1,7 +1,7 @@ ## @file
# This file is used to define common parser functions for meta-data
#
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
-import os
+import Common.LongFilePathOs as os
from CommonDataClass.DataClass import *
from EccToolError import *
import EccGlobalData
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py index 643c228..0d53f05 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py @@ -1,7 +1,7 @@ ## @file
# This file is used to create/update/query/erase table for files
#
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -14,7 +14,7 @@ ##
# Import Modules
#
-import os
+import Common.LongFilePathOs as os
import Common.EdkLogger as EdkLogger
from CommonDataClass import DataClass
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index 405c5b5..949d067 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -14,7 +14,7 @@ ##
# Import Modules
#
-import os
+import Common.LongFilePathOs as os
import re
import time
import copy
@@ -31,7 +31,8 @@ from Common.Expression import * from CommonDataClass.Exceptions import *
from MetaFileTable import MetaFileStorage
-from GenFds.FdfParser import FdfParser
+from GenFds.FdfParser import FdfParser
+from Common.LongFilePathSupport import OpenLongFilePath as open
## A decorator used to parse macro definition
def ParseMacro(Parser):
diff --git a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py index 5823067..b93588e 100644 --- a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py +++ b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py @@ -2,7 +2,7 @@ # This is an XML API that uses a syntax similar to XPath, but it is written in
# standard python so that no extra python packages are required to use it.
#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -16,6 +16,7 @@ # Import Modules
#
import xml.dom.minidom
+from Common.LongFilePathSupport import OpenLongFilePath as open
## Create a element of XML
#
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index ea7d99f..6c20f6c 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -1,7 +1,7 @@ ## @file
# This file is used to be the c coding style checking of ECC tool
#
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -12,7 +12,7 @@ #
import sys
-import os
+import Common.LongFilePathOs as os
import re
import string
import CodeFragmentCollector
|