summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C
diff options
context:
space:
mode:
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;
}