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
);
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++;
}
}