From 46b5ebc877ae80e2fea6709552cbff46965f3abe Mon Sep 17 00:00:00 2001 From: qwang12 Date: Tue, 29 Apr 2008 07:06:10 +0000 Subject: [PATCH] For UNI file, some String may not be defined for a language. This has been true for a lot of platform code. For this case, EFI_NOT_FOUND will be returned. To allow the old code to be run without porting, we don't assert on EFI_NOT_FOUND. The missing String will be declared if user select differnt languages for the platform. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5149 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c index 85124c0316..6907718b33 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c @@ -133,6 +133,7 @@ HiiThunkNewStringForAllStringPackages ( *Reference = StringId1; Status = EFI_SUCCESS; } else { + ASSERT (FALSE); Status = EFI_NOT_FOUND; } @@ -173,9 +174,14 @@ Returns: ASSERT_EFI_ERROR (Status); Status = HiiThunkNewStringForAllStringPackages (Private, &TagGuid, Language, Reference, NewString); - ASSERT_EFI_ERROR (Status); + // + // For UNI file, some String may not be defined for a language. This has been true for a lot of platform code. + // For this case, EFI_NOT_FOUND will be returned. To allow the old code to be run without porting, we don't assert + // on EFI_NOT_FOUND. The missing String will be declared if user select differnt languages for the platform. + // + ASSERT_EFI_ERROR (EFI_ERROR (Status) && Status != EFI_NOT_FOUND); - return EFI_SUCCESS; + return Status; } EFI_STATUS -- 2.39.2