From 3d61921be280fab9b4a5740a8f20a65d4bd2a4cf Mon Sep 17 00:00:00 2001 From: Burt P Date: Mon, 1 Oct 2018 17:31:58 -0500 Subject: devices: Remove product-version from string returned by getMotherboard() This reverts a change 2db563687071c099851c59396bdde29a00dba156. It seems to me that using product version in this way gives inconsistent values. The recent benchmark result submitted demonstrates the problem: `2.0 / X370 SLI PLUS (MS-7A33) (Micro-Star International Co., Ltd.)` The product version `2.0` is put in front, but without the product name or product vendor for context, it doesn't really add anything. The board vendor, which otherwise would be in front, is now in () at the end. When the product version is not defined, then the motherboard is reported as ` `. The only time it is ` ()` is when product version is defined. If this change is applied, that same motherboard would be reported `Micro-Star International Co., Ltd. X370 SLI PLUS (MS-7A33)` which, to me, makes more sense for getMotherboard(). I have no idea what "product" this is version 2.0 of. Signed-off-by: Burt P --- modules/devices.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/devices.c b/modules/devices.c index 1bcf2f1f..ad5c641d 100644 --- a/modules/devices.c +++ b/modules/devices.c @@ -355,7 +355,7 @@ gchar *get_memory_total(void) gchar *get_motherboard(void) { - char *board_name, *board_vendor, *system_version; + char *board_name, *board_vendor; char *ret; #if defined(ARCH_x86) || defined(ARCH_x86_64) @@ -369,11 +369,7 @@ gchar *get_motherboard(void) if (board_vendor == NULL) board_vendor = dmi_get_str("system-manufacturer"); - system_version = dmi_get_str("system-version"); - - if (board_name && board_vendor && system_version) - ret = g_strdup_printf("%s / %s (%s)", system_version, board_name, board_vendor); - else if (board_name && board_vendor) + if (board_name && board_vendor) ret = g_strconcat(board_vendor, " ", board_name, NULL); else if (board_name) ret = g_strdup(board_name); @@ -384,7 +380,6 @@ gchar *get_motherboard(void) free(board_name); free(board_vendor); - free(system_version); return ret; #endif -- cgit v1.2.3