summaryrefslogtreecommitdiff
path: root/MdePkg/Include
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-21 08:50:52 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-21 08:50:52 +0000
commitf8d18bada5af6d1f89cfc3cd50580d590a641e50 (patch)
tree2faa78e2f906e072bb6770167c6c31d6e9675099 /MdePkg/Include
parentc0522bd7dfae2dd290726dad1b55abd8d4925711 (diff)
downloadedk2-platforms-f8d18bada5af6d1f89cfc3cd50580d590a641e50.tar.xz
HiiLibGetCurrentLanguage returns the current UEFI variable "PlatformLang" (if this variable does not exist, a default value is returned). This function is called by HiiDatabase itself. Now, HiiLibGetCurrentLanguage is in HiiLib. Because of this, we can't add location of Hii protoocol in the library constructor of HiiLib. This cause Hii Database driver never get loaded (circular dependency).
By moving HiiLibGetCurrentLanguage to UefiLib, library constructor (depex) can be added back to HiiLib to make sure the execution order is correct. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5938 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include')
-rw-r--r--MdePkg/Include/Library/HiiLib.h26
-rw-r--r--MdePkg/Include/Library/UefiLib.h28
2 files changed, 28 insertions, 26 deletions
diff --git a/MdePkg/Include/Library/HiiLib.h b/MdePkg/Include/Library/HiiLib.h
index 59e1780a99..36fd8f602c 100644
--- a/MdePkg/Include/Library/HiiLib.h
+++ b/MdePkg/Include/Library/HiiLib.h
@@ -15,11 +15,6 @@
#ifndef __HII_LIB_H__
#define __HII_LIB_H__
-///
-/// Limited buffer size recommended by RFC3066
-/// (42 characters plus a NULL terminator)
-///
-#define RFC_3066_ENTRY_SIZE (42 + 1)
#define ISO_639_2_ENTRY_SIZE 3
@@ -289,27 +284,6 @@ HiiLibDevicePathToHiiHandle (
/**
- 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
-HiiLibGetCurrentLanguage (
- OUT CHAR8 *Lang
- );
-
-/**
Get next language from language code list (with separator ';').
If LangCode is NULL, then ASSERT.
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index 13ab258ebe..fa04704c33 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -23,6 +23,12 @@
#include <Protocol/DriverDiagnostics2.h>
///
+/// Limited buffer size recommended by RFC3066
+/// (42 characters plus a NULL terminator)
+///
+#define RFC_3066_ENTRY_SIZE (42 + 1)
+
+///
/// Unicode String Table
///
typedef struct {
@@ -986,4 +992,26 @@ EfiLibInstallAllDriverProtocols2 (
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
);
+/**
+ 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