aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/spd-decode.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-06-29 22:22:16 -0500
committerBurt P <pburt0@gmail.com>2019-06-29 22:44:46 -0500
commit91a833a52e0c8b025969b88a9671e99ed8a1bf5e (patch)
tree6b0b27de58982ed72d9366aa5a4f5f956c8817dc /modules/devices/spd-decode.c
parentec3c0e9098b0491ac6032c06f691e45d4bd12299 (diff)
Memory Devices: Fix DMI to SPD matching
Should fix https://github.com/lpereira/hardinfo/issues/380 Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/spd-decode.c')
-rw-r--r--modules/devices/spd-decode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/devices/spd-decode.c b/modules/devices/spd-decode.c
index 4c34882f..164ad9dc 100644
--- a/modules/devices/spd-decode.c
+++ b/modules/devices/spd-decode.c
@@ -62,6 +62,7 @@ static const char *ram_types[] = {"Unknown", "Direct Rambus", "Rambus",
#include "spd-vendors.c"
+struct dmi_mem_socket;
typedef struct {
unsigned char bytes[512];
unsigned char dev[32]; /* %1d-%04d\0 */
@@ -92,7 +93,9 @@ typedef struct {
int week, year;
gboolean ddr4_no_ee1004;
- gboolean claimed_by_dmi;
+
+ struct dmi_mem_socket *dmi_socket;
+ int match_score;
} spd_data;
#define spd_data_new() g_new0(spd_data, 1)
@@ -1104,6 +1107,7 @@ static GSList *decode_dimms2(GSList *eeprom_list, gboolean use_sysfs, int max_si
s->spd_rev_minor = bytes[1] & 0xf;
break;
}
+ s->vendor = vendor_match(s->vendor_str, NULL);
s->dram_vendor = vendor_match(s->dram_vendor_str, NULL);
dimm_list = g_slist_append(dimm_list, s);
}