aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2020-05-09 18:37:09 -0700
committerLeandro Pereira <leandro@hardinfo.org>2020-05-09 18:39:11 -0700
commit99866467da395f141788654952f2964d3106c9f0 (patch)
tree9b0c4bbb63c6ce6aef58c6aca246feeaf94e79ea
parent2dbe79d105e7898ee2594e2038052150436eb207 (diff)
Make more data files updatable by moving them to data/
-rw-r--r--CMakeLists.txt15
-rw-r--r--data/arm.ids (renamed from deps/sysobj_early/data/arm.ids)0
-rw-r--r--data/edid.ids (renamed from deps/sysobj_early/data/edid.ids)0
-rw-r--r--data/ieee_oui.ids (renamed from deps/sysobj_early/data/ieee_oui.ids)0
-rw-r--r--data/pci.ids.min (renamed from deps/sysobj_early/data/pci.ids.min)0
-rw-r--r--data/sdcard.ids (renamed from deps/sysobj_early/data/sdcard.ids)0
-rw-r--r--data/usb.ids (renamed from deps/sysobj_early/data/usb.ids)0
-rw-r--r--data/vendor.ids (renamed from deps/sysobj_early/data/vendor.ids)0
-rw-r--r--modules/devices.c41
9 files changed, 36 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7401513c..2b469476 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,14 +125,13 @@ set(HARDINFO_MODULES
set(HARDINFO_RESOURCES
"data/benchmark.conf"
"data/benchmark.json"
- "data/benchmark.data"
- "deps/sysobj_early/data/vendor.ids"
- "deps/sysobj_early/data/sdcard.ids"
- "deps/sysobj_early/data/usb.ids"
- "deps/sysobj_early/data/arm.ids"
- "deps/sysobj_early/data/edid.ids"
- "deps/sysobj_early/data/ieee_oui.ids"
- "deps/sysobj_early/data/pci.ids.min"
+ "data/vendor.ids"
+ "data/sdcard.ids"
+ "data/usb.ids"
+ "data/arm.ids"
+ "data/edid.ids"
+ "data/ieee_oui.ids"
+ "data/pci.ids.min"
)
set(HARDINFO_MANPAGES
diff --git a/deps/sysobj_early/data/arm.ids b/data/arm.ids
index 8e256ec3..8e256ec3 100644
--- a/deps/sysobj_early/data/arm.ids
+++ b/data/arm.ids
diff --git a/deps/sysobj_early/data/edid.ids b/data/edid.ids
index 9f959804..9f959804 100644
--- a/deps/sysobj_early/data/edid.ids
+++ b/data/edid.ids
diff --git a/deps/sysobj_early/data/ieee_oui.ids b/data/ieee_oui.ids
index 217cfa05..217cfa05 100644
--- a/deps/sysobj_early/data/ieee_oui.ids
+++ b/data/ieee_oui.ids
diff --git a/deps/sysobj_early/data/pci.ids.min b/data/pci.ids.min
index 3a9009d6..3a9009d6 100644
--- a/deps/sysobj_early/data/pci.ids.min
+++ b/data/pci.ids.min
diff --git a/deps/sysobj_early/data/sdcard.ids b/data/sdcard.ids
index 08dfc49b..08dfc49b 100644
--- a/deps/sysobj_early/data/sdcard.ids
+++ b/data/sdcard.ids
diff --git a/deps/sysobj_early/data/usb.ids b/data/usb.ids
index d52f1a0a..d52f1a0a 100644
--- a/deps/sysobj_early/data/usb.ids
+++ b/data/usb.ids
diff --git a/deps/sysobj_early/data/vendor.ids b/data/vendor.ids
index 10c0456f..10c0456f 100644
--- a/deps/sysobj_early/data/vendor.ids
+++ b/data/vendor.ids
diff --git a/modules/devices.c b/modules/devices.c
index 05d3bf8a..cb4c723d 100644
--- a/modules/devices.c
+++ b/modules/devices.c
@@ -830,21 +830,38 @@ guchar hi_module_get_weight(void)
void hi_module_init(void)
{
- static SyncEntry pci_ids = {
- .name = N_("Update PCI ID listing"),
- .file_name = "pci.ids",
- };
-
- sync_manager_add_entry(&pci_ids);
-
+ static SyncEntry entries[] = {
+ {
+ .name = N_("Update PCI ID listing"),
+ .file_name = "pci.ids",
+ },
+ {
+ .name = N_("Update USB ID listing"),
+ .file_name = "usb.ids",
+ },
+ {
+ .name = N_("Update EDID vendor codes"),
+ .file_name = "edid.ids",
+ },
+ {
+ .name = N_("Update IEEE OUI vendor codes"),
+ .file_name = "ieee_oui.ids",
+ },
+ {
+ .name = N_("Update SD card manufacturer information"),
+ .file_name = "sdcard.ids",
+ },
#if defined(ARCH_x86) || defined(ARCH_x86_64)
- static SyncEntry cpuflags_conf = {
- .name = N_("Update CPU feature database"),
- .file_name = "cpuflags.conf",
+ {
+ .name = N_("Update CPU feature database"),
+ .file_name = "cpuflags.conf",
+ },
+#endif /* defined(ARCH_x86) */
};
+ gint i;
- sync_manager_add_entry(&cpuflags_conf);
-#endif /* defined(ARCH_x86) */
+ for (i = 0; i < G_N_ELEMENTS(entries); i++)
+ sync_manager_add_entry(&entries[i]);
init_cups();
sensors_init();