summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-06-16 11:00:00 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-06-16 12:06:07 -0700
commit098e0c0955305ae60cf8b8892bcf34a957f5286c (patch)
treeeb0cea90610279246db15a5630859662c7135a1a /modules
parent8afbbc6d7bb116106bcea30b360d89a9e327eab7 (diff)
devices/spd-decode.c: add source information
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/devices/spd-decode.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/devices/spd-decode.c b/modules/devices/spd-decode.c
index 91a673d8..ae304a4f 100644
--- a/modules/devices/spd-decode.c
+++ b/modules/devices/spd-decode.c
@@ -1762,9 +1762,13 @@ static gchar *decode_dimms(GSList *dimm_list, gboolean use_sysfs, int max_size)
default: DEBUG("Unsupported EEPROM type: %s\n", ram_types[ram_type]); continue;
}
- gchar *key = g_strdup_printf("MEM%d", count);
- moreinfo_add_with_prefix("DEV", key, g_strdup(detailed_info));
- g_free(key);
+ if (detailed_info) {
+ gchar *more_detailed_info = g_strdup_printf("%s[%s]\n%s=%s\n",
+ detailed_info, _("Source"), _("Path"), spd_path);
+ gchar *key = g_strdup_printf("MEM%d", count);
+ moreinfo_add_with_prefix("DEV", key, more_detailed_info); /* moreinfo now owns *more_detailed_info */
+ g_free(key);
+ }
if (!output)
output = g_string_new("");