]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/FdfParser.py
Sync EDKII BaseTools to BaseTools project r1988
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FdfParser.py
index 1e87eb410eb5983075306f47b098f00b3cc01eea..69a489849932e5504ab03ba637af8b8181b15644 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
 # parse FDF file\r
 #\r
-#  Copyright (c) 2007 - 2010, Intel Corporation\r
+#  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
 #\r
-#  All rights reserved. This program and the accompanying materials\r
+#  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
@@ -2388,9 +2388,11 @@ class FdfParser:
             FfsFileObj.CheckSum = True\r
 \r
         if self.__GetAlignment():\r
-            FfsFileObj.Alignment = self.__Token\r
-\r
-\r
+            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+                raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
+            #For FFS, Auto is default option same to ""\r
+            if not self.__Token == "Auto":\r
+                FfsFileObj.Alignment = self.__Token\r
 \r
     ## __GetAlignment() method\r
     #\r