summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aef788a)
raw | patch | inline | side by side (parent: aef788a)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 25 Dec 2015 09:54:47 +0000 (10:54 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 4 Aug 2016 09:21:49 +0000 (11:21 +0200) |
Recent Linux kernels store the uuid in /sys/class/dmi/id/product_uuid.
src/uuid.c | patch | blob | history |
diff --git a/src/uuid.c b/src/uuid.c
index 223bfd544b8c680dd5c8722ba0dd484dcad07ec8..e837ca725db74274d4b12868f102a8c4ade6a1d5 100644 (file)
--- a/src/uuid.c
+++ b/src/uuid.c
if ((uuid = uuid_get_from_file(uuidfile ? uuidfile : "/etc/uuid")) != NULL)
return (uuid);
+#if defined(__linux__)
+ if ((uuid = uuid_get_from_file("/sys/class/dmi/id/product_uuid")) != NULL)
+ return (uuid);
+#endif
+
#if HAVE_LIBHAL_H
- if ((uuid = uuid_get_from_hal()) != NULL) {
- return uuid;
- }
+ if ((uuid = uuid_get_from_hal()) != NULL)
+ return (uuid);
#endif
if ((uuid = uuid_get_from_dmidecode()) != NULL)