From 64ed98209466374a0f6cf9c38f9693cf62636159 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sat, 29 Jun 2019 22:06:15 -0700 Subject: Clean up distro-detecting code --- includes/computer.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/computer.h b/includes/computer.h index 05db78c3..57da9db3 100644 --- a/includes/computer.h +++ b/includes/computer.h @@ -27,6 +27,7 @@ typedef struct _MemoryInfo MemoryInfo; typedef struct _UptimeInfo UptimeInfo; typedef struct _LoadInfo LoadInfo; typedef struct _DisplayInfo DisplayInfo; +typedef struct _Distro Distro; typedef struct _AlsaInfo AlsaInfo; typedef struct _AlsaCard AlsaCard; @@ -92,7 +93,8 @@ struct _Computer { struct _OperatingSystem { gchar *kernel; gchar *libc; - gchar *distrocode, *distro; + gchar *distrocode; + gchar *distro; gchar *hostname; gchar *language; gchar *homedir; @@ -113,6 +115,11 @@ struct _MemoryInfo { gfloat ratio; }; +struct _Distro { + gchar *distro; + gchar *codename; +}; + #define get_str(field_name,ptr) \ if (g_str_has_prefix(tmp[0], field_name)) { \ ptr = g_strdup(tmp[1]); \ -- cgit v1.2.3