From 754a87070910c336c7f62074aeac587374f85403 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 6 Jul 2019 15:22:26 -0500 Subject: computer/os: Ubuntu flavors See: https://github.com/lpereira/hardinfo/issues/404 Signed-off-by: Burt P --- modules/computer/os.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/computer/os.c') diff --git a/modules/computer/os.c b/modules/computer/os.c index 536d328f..dae93761 100644 --- a/modules/computer/os.c +++ b/modules/computer/os.c @@ -21,6 +21,7 @@ #include #include "hardinfo.h" #include "computer.h" +#include "ubuntu_flavors.h" static gchar * get_libc_version(void) @@ -531,6 +532,15 @@ computer_get_os(void) os->entropy_avail = computer_get_entropy_avail(); + if (g_strcmp0(os->distrocode, "ubuntu") == 0) { + GSList *flavs = ubuntu_flavors_scan(); + if (flavs) { + /* just use the first one */ + os->ubuntu_flavor = (UbuntuFlavor*)flavs->data; + } + g_slist_free(flavs); + } + return os; } -- cgit v1.2.3