summaryrefslogtreecommitdiff
path: root/EmulatorPkg/Library/SmbiosLib
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-31 09:06:53 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-31 09:06:53 +0000
commit79b3ce7e99eda77ab0c5e7637e805dda291cd631 (patch)
tree03a3c76f20bfb3e80b82ba552d1f3b49ede7ee1f /EmulatorPkg/Library/SmbiosLib
parent07bcff9dbf49708ce2885bf9af4ee05249c89146 (diff)
downloadedk2-platforms-79b3ce7e99eda77ab0c5e7637e805dda291cd631.tar.xz
Update based on review feedback.
signed-off-by:andrewfish reviewed-by:Elvin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12976 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmulatorPkg/Library/SmbiosLib')
-rw-r--r--EmulatorPkg/Library/SmbiosLib/SmbiosLib.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.c b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.c
index 15e135974f..604aa39d0c 100644
--- a/EmulatorPkg/Library/SmbiosLib/SmbiosLib.c
+++ b/EmulatorPkg/Library/SmbiosLib/SmbiosLib.c
@@ -241,28 +241,29 @@ SmbiosLibUpdateUnicodeString (
Allow caller to read a specific SMBIOS string
@param[in] Header SMBIOS record that contains the string.
- @param[in[ Intance Instance of SMBIOS string 0 - N-1.
+ @param[in[ StringNumber Instance of SMBIOS string 1 - N.
@retval NULL Instance of Type SMBIOS string was not found.
@retval Other Pointer to matching SMBIOS string.
**/
CHAR8 *
+EFIAPI
SmbiosLibReadString (
- IN SMBIOS_STRUCTURE *Header,
- IN UINTN Instance
+ IN SMBIOS_STRUCTURE *Header,
+ IN EFI_SMBIOS_STRING StringNumber
)
{
CHAR8 *Data;
- UINTN NullCount;
+ UINTN Match;
Data = (CHAR8 *)Header + Header->Length;
- for (NullCount = 0;!(*Data == 0 && *(Data+1) == 0); ) {
- if (Instance == NullCount) {
+ for (Match = 1;!(*Data == 0 && *(Data+1) == 0); ) {
+ if (StringNumber == Match) {
return Data;
}
Data++;
if (*(Data - 1) == '\0') {
- NullCount++;
+ Match++;
}
}