mirror of https://github.com/acidanthera/audk.git
Make HiiDatabase module not depend on HiiLib; otherwise it will inherit HII_DATABASE_PROTOCOL to its own dependency.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6764 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0891b0a2cb
commit
8db9d51d78
|
@ -40,7 +40,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/IfrSupportLib.h>
|
#include <Library/IfrSupportLib.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/HiiLib.h>
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||||
|
|
||||||
|
|
||||||
#define HII_DATABASE_NOTIFY_GUID \
|
#define HII_DATABASE_NOTIFY_GUID \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -59,7 +59,8 @@
|
||||||
DebugLib
|
DebugLib
|
||||||
IfrSupportLib
|
IfrSupportLib
|
||||||
UefiLib
|
UefiLib
|
||||||
HiiLib
|
PcdLib
|
||||||
|
UefiRuntimeServicesTableLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiConsoleControlProtocolGuid
|
gEfiConsoleControlProtocolGuid
|
||||||
|
@ -74,6 +75,12 @@
|
||||||
[FeaturePcd.common]
|
[FeaturePcd.common]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHiiImageProtocol
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHiiImageProtocol
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportFullConfigRoutingProtocol
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportFullConfigRoutingProtocol
|
||||||
|
|
||||||
|
[Pcd.common]
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
|
||||||
|
|
||||||
|
[Guids]
|
||||||
|
gEfiGlobalVariableGuid
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
|
|
@ -57,4 +57,49 @@ R8_EfiLibCompareLanguage (
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Determine what is the current language setting. The space reserved for Lang
|
||||||
|
must be at least RFC_3066_ENTRY_SIZE bytes;
|
||||||
|
|
||||||
|
If Lang is NULL, then ASSERT.
|
||||||
|
|
||||||
|
@param Lang Pointer of system language. Lang will always be filled with
|
||||||
|
a valid RFC 3066 language string. If "PlatformLang" is not
|
||||||
|
set in the system, the default language specifed by PcdUefiVariableDefaultPlatformLang
|
||||||
|
is returned.
|
||||||
|
|
||||||
|
@return EFI_SUCCESS If the EFI Variable with "PlatformLang" is set and return in Lang.
|
||||||
|
@return EFI_NOT_FOUND If the EFI Variable with "PlatformLang" is not set, but a valid default language is return in Lang.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
GetCurrentLanguage (
|
||||||
|
OUT CHAR8 *Lang
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINTN Size;
|
||||||
|
|
||||||
|
ASSERT (Lang != NULL);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get current language setting
|
||||||
|
//
|
||||||
|
Size = RFC_3066_ENTRY_SIZE;
|
||||||
|
Status = gRT->GetVariable (
|
||||||
|
L"PlatformLang",
|
||||||
|
&gEfiGlobalVariableGuid,
|
||||||
|
NULL,
|
||||||
|
&Size,
|
||||||
|
Lang
|
||||||
|
);
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
AsciiStrCpy (Lang, (CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ Implement a utility function named R8_EfiLibCompareLanguage.
|
||||||
#ifndef __R8_LIB_H__
|
#ifndef __R8_LIB_H__
|
||||||
#define __R8_LIB_H__
|
#define __R8_LIB_H__
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Compare whether two names of languages are identical.
|
Compare whether two names of languages are identical.
|
||||||
|
|
||||||
|
@ -35,6 +34,26 @@ R8_EfiLibCompareLanguage (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Determine what is the current language setting. The space reserved for Lang
|
||||||
|
must be at least RFC_3066_ENTRY_SIZE bytes;
|
||||||
|
|
||||||
|
If Lang is NULL, then ASSERT.
|
||||||
|
|
||||||
|
@param Lang Pointer of system language. Lang will always be filled with
|
||||||
|
a valid RFC 3066 language string. If "PlatformLang" is not
|
||||||
|
set in the system, the default language specifed by PcdUefiVariableDefaultPlatformLang
|
||||||
|
is returned.
|
||||||
|
|
||||||
|
@return EFI_SUCCESS If the EFI Variable with "PlatformLang" is set and return in Lang.
|
||||||
|
@return EFI_NOT_FOUND If the EFI Variable with "PlatformLang" is not set, but a valid default language is return in Lang.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
GetCurrentLanguage (
|
||||||
|
OUT CHAR8 *Lang
|
||||||
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue