diff options
author | Qing Huang <qing.huang@intel.com> | 2008-10-10 02:33:21 +0000 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2016-04-06 23:22:43 -0700 |
commit | 1f7de705d6d3cbd33092211da550a621230d6ee1 (patch) | |
tree | 893ec20cb5af0057d82a9f807c1174cdb2f371f9 /FatPkg | |
parent | c3b8ec4310a6a5a51854e19285f4057a01ca08fc (diff) | |
download | edk2-1f7de705d6d3cbd33092211da550a621230d6ee1.tar.gz edk2-1f7de705d6d3cbd33092211da550a621230d6ee1.tar.bz2 edk2-1f7de705d6d3cbd33092211da550a621230d6ee1.zip |
Add details comments for the code flow to initialize Unicode Collation (2) support.
(based on FatPkg commit 824fb80c85dfcb97662b8807c075c6cf7113b521)
[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg')
-rw-r--r-- | FatPkg/EnhancedFatDxe/UnicodeCollation.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/FatPkg/EnhancedFatDxe/UnicodeCollation.c b/FatPkg/EnhancedFatDxe/UnicodeCollation.c index 4a849af2eb..9e5db7b967 100644 --- a/FatPkg/EnhancedFatDxe/UnicodeCollation.c +++ b/FatPkg/EnhancedFatDxe/UnicodeCollation.c @@ -162,6 +162,12 @@ InitializeUnicodeCollationSupportWithConfig ( /**
Initialize Unicode Collation support.
+ This function searches Initialized Unicode Collation support based on PCDs:
+ PcdUnicodeCollation2Support and PcdUnicodeCollationSupport.
+ It first tries to locate Unicode Collation 2 protocol and matches it with current
+ platform language code. If for any reason the first attempt fails, it then tries to
+ use Unicode Collation Protocol.
+
@param AgentHandle The handle used to open Unicode Collation (2) protocol.
@retval EFI_SUCCESS The Unicode Collation (2) protocol has been successfully located.
@@ -177,10 +183,18 @@ InitializeUnicodeCollationSupport ( EFI_STATUS Status;
Status = EFI_UNSUPPORTED;
+
+ //
+ // First try to use RFC 3066 Unicode Collation 2 Protocol.
+ //
if (FeaturePcdGet (PcdUnicodeCollation2Support)) {
Status = InitializeUnicodeCollationSupportWithConfig (AgentHandle, &mRfc3066Lang);
}
+ //
+ // If the attempt to use Unicode Collation 2 Protocol fails, then we fall back
+ // on the ISO 639-2 Unicode Collation Protocol.
+ //
if (FeaturePcdGet (PcdUnicodeCollationSupport) && EFI_ERROR (Status)) {
Status = InitializeUnicodeCollationSupportWithConfig (AgentHandle, &mIso639Lang);
}
|