[edk2-devel] [PATCH] BaseTools:Enables FFS to support the GUID value format

Fan, ZhijuX zhijux.fan at intel.com
Thu May 9 09:34:02 UTC 2019


BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1768

Per FDF spec, FFS Rule can specify the hard code FILE Guid value.
But,BaseTools reports the build failure.It should be fixed.

This patch is going to fix that issue.

Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Liming Gao <liming.gao at intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan at intel.com>
---
 BaseTools/Source/Python/GenFds/FdfParser.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 54f61ae05e..aab64d6833 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -990,7 +990,7 @@ class FdfParser:
 
         TempChar = self._CurrentChar()
         StartPos = self.CurrentOffsetWithinLine
-        if (TempChar >= 'a' and TempChar <= 'z') or (TempChar >= 'A' and TempChar <= 'Z') or TempChar == '_':
+        if (TempChar >= 'a' and TempChar <= 'z') or (TempChar >= 'A' and TempChar <= 'Z') or (TempChar >= '0' and TempChar <= '9') or TempChar == '_':
             self._GetOneChar()
             while not self._EndOfLine():
                 TempChar = self._CurrentChar()
@@ -1002,6 +1002,8 @@ class FdfParser:
                     break
 
             self._Token = self._CurrentLine()[StartPos: self.CurrentOffsetWithinLine]
+            if (TempChar >= '0' and TempChar <= '9') and not GlobalData.gGuidPattern.search(self._Token):
+                return False
             return True
 
         return False
-- 
2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40312): https://edk2.groups.io/g/devel/message/40312
Mute This Topic: https://groups.io/mt/31553425/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3911 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20190509/5ece82b8/attachment.bin>


More information about the edk2-devel-archive mailing list