From: Yonghong Zhu Date: Wed, 9 Nov 2016 10:18:01 +0000 (+0800) Subject: BaseTools: Fix the bug to support generate FFS by Align=Auto X-Git-Tag: edk2-stable201903~5201 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=f475f1e2361877e9947ecda98a697bc55fb9d85a 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 --- 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)