summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
index e9360beb23..7e7eef3fd8 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
@@ -3,6 +3,7 @@
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2023 Apple Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -263,7 +264,7 @@ SMBiosView (
return EFI_BAD_BUFFER_SIZE;
}
- if (CompareMem (SMBiosTable->AnchorString, "_SM_", 4) == 0) {
+ if (CompareMem (SMBiosTable->AnchorString, SMBIOS_ANCHOR_STRING, SMBIOS_ANCHOR_STRING_LENGTH) == 0) {
//
// Have got SMBIOS table
//
@@ -441,7 +442,7 @@ SMBios64View (
return EFI_BAD_BUFFER_SIZE;
}
- if (CompareMem (SMBiosTable->AnchorString, "_SM3_", 5) == 0) {
+ if (CompareMem (SMBiosTable->AnchorString, SMBIOS_3_0_ANCHOR_STRING, SMBIOS_3_0_ANCHOR_STRING_LENGTH) == 0) {
//
// Have got SMBIOS table
//
@@ -612,7 +613,7 @@ InitSmbiosTableStatistics (
return EFI_NOT_FOUND;
}
- if (CompareMem (SMBiosTable->AnchorString, "_SM_", 4) != 0) {
+ if (CompareMem (SMBiosTable->AnchorString, SMBIOS_ANCHOR_STRING, SMBIOS_ANCHOR_STRING_LENGTH) != 0) {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_TABLE), gShellDebug1HiiHandle);
return EFI_INVALID_PARAMETER;
}
@@ -753,7 +754,7 @@ InitSmbios64BitTableStatistics (
return EFI_NOT_FOUND;
}
- if (CompareMem (SMBiosTable->AnchorString, "_SM3_", 5) != 0) {
+ if (CompareMem (SMBiosTable->AnchorString, SMBIOS_3_0_ANCHOR_STRING, SMBIOS_3_0_ANCHOR_STRING_LENGTH) != 0) {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_SMBIOS_TABLE), gShellDebug1HiiHandle);
return EFI_INVALID_PARAMETER;
}