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 5bb4472..446969a 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)