File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+
10151021static 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 );
You can’t perform that action at this time.
0 commit comments