summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2015-12-18 06:48:32 +0000
committervanjeff <vanjeff@Edk2>2015-12-18 06:48:32 +0000
commit8e3314b048ed8efac7d743d23a32f89634055bac (patch)
treeb2a0fa1789b554dea88cee9440bc7a50485da245 /BaseTools/Source/C
parentb30dd623c9151866cd1ef1cf31de62d415586875 (diff)
downloadedk2-platforms-8e3314b048ed8efac7d743d23a32f89634055bac.tar.xz
BaseTools: Enhance GenFv Tool to report error message
When two vtf files in one FV image, no FV file can be generated, but it report the stack trace info. so we enhance the tool to report error message directly but not the stack trace info. (Sync patch r19141 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19376 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 6d2d5d1f8c..10bb88b0a8 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -2854,17 +2854,18 @@ Returns:
fclose (fpin);
if (FvInfoPtr->IsPiFvImage) {
- //
- // Check whether this ffs file is vtf file
- //
- if (IsVtfFile (&FfsHeader)) {
- if (VtfFileFlag) {
- //
- // One Fv image can't have two vtf files.
- //
- return EFI_ABORTED;
- }
- VtfFileFlag = TRUE;
+ //
+ // Check whether this ffs file is vtf file
+ //
+ if (IsVtfFile (&FfsHeader)) {
+ if (VtfFileFlag) {
+ //
+ // One Fv image can't have two vtf files.
+ //
+ Error (NULL, 0, 3000,"Invalid", "One Fv image can't have two vtf files.");
+ return EFI_ABORTED;
+ }
+ VtfFileFlag = TRUE;
VtfFileSize = FfsFileSize;
continue;
}