Code

uuid plugin: look in smbios system table for uuid
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 25 Dec 2015 09:51:01 +0000 (10:51 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 4 Aug 2016 09:21:09 +0000 (11:21 +0200)
This saves a lot of parsing when dmidecode output is large.

src/uuid.c

index 5bb4472e596c7ed6b816e14e4633ed0169385b9b..446969aa71b05a1739cc9b73b986d7d6c2168e29 100644 (file)
@@ -97,7 +97,7 @@ uuid_parse_dmidecode(FILE *file)
 static char *
 uuid_get_from_dmidecode(void)
 {
-    FILE *dmidecode = popen("dmidecode 2>/dev/null", "r");
+    FILE *dmidecode = popen("dmidecode -t system 2>/dev/null", "r");
     char *uuid;
 
     if (!dmidecode)