From f475f1e2361877e9947ecda98a697bc55fb9d85a Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Wed, 9 Nov 2016 18:18:01 +0800 Subject: [PATCH] BaseTools: Fix the bug to support generate FFS by Align=Auto FDF spec support to use 'Auto' as , but current Tool report error about -a=Auto is invalid option when we set Align=Auto for RAW File. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- 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 5489df59a6..f17a41f94d 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -2746,7 +2746,9 @@ class FdfParser: if self.__GetAlignment(): if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"): raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber) - AlignValue = self.__Token + #For FFS, Auto is default option same to "" + if not self.__Token == "Auto": + AlignValue = self.__Token if not self.__GetNextToken(): raise Warning("expected Filename value", self.FileName, self.CurrentLineNumber) -- 2.39.2