]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/FvImageSection.py
BaseTools: Enhance error message when file is not exist for Gensec
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FvImageSection.py
index 57ecea0377bfcccb0c0927faa702696873d6166f..3a4d8fb91b70cf47ad25f065c8e6fc12049df147 100644 (file)
@@ -133,6 +133,12 @@ class FvImageSection(FvImageSectionClassObject):
                             # FvAlignmentValue is less than 1K\r
                             self.Alignment = str (FvAlignmentValue)\r
                         FvFileObj.close()\r
+                    else:\r
+                        if len (mws.getPkgPath()) == 0:\r
+                            EdkLogger.error("GenFds", FILE_NOT_FOUND, "%s is not found in WORKSPACE: %s" % self.FvFileName, GenFdsGlobalVariable.WorkSpaceDir)\r
+                        else:\r
+                            EdkLogger.error("GenFds", FILE_NOT_FOUND, "%s is not found in packages path:\n\t%s" % (self.FvFileName, '\n\t'.join(mws.getPkgPath())))\r
+\r
                 else:\r
                     EdkLogger.error("GenFds", GENFDS_ERROR, "FvImageSection Failed! %s NOT found in FDF" % self.FvName)\r
 \r