Skip to content

Commit e84011e

Browse files
dwsuseigaw
authored andcommitted
fabrics: Add define for DMI sysinfo
1 parent f712c27 commit e84011e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/nvme/fabrics.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,12 @@ static int uuid_from_device_tree(char *system_uuid)
10121012

10131013
#define PATH_DMI_ENTRIES "/sys/firmware/dmi/entries"
10141014

1015+
/*
1016+
* See System Management BIOS (SMBIOS) Reference Specification
1017+
* https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.2.0.pdf
1018+
*/
1019+
#define DMI_SYSTEM_INFORMATION 1
1020+
10151021
static int uuid_from_dmi_entries(char *system_uuid)
10161022
{
10171023
int f;
@@ -1039,7 +1045,7 @@ static int uuid_from_dmi_entries(char *system_uuid)
10391045
continue;
10401046
if (sscanf(buf, "%d", &type) != 1)
10411047
continue;
1042-
if (type != 1)
1048+
if (type != DMI_SYSTEM_INFORMATION)
10431049
continue;
10441050
sprintf(filename, "%s/%s/raw", PATH_DMI_ENTRIES, de->d_name);
10451051
f = open(filename, O_RDONLY);

0 commit comments

Comments
 (0)