aboutsummaryrefslogtreecommitdiff
path: root/modules/devices.c
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2020-05-09 18:30:48 -0700
committerLeandro Pereira <leandro@hardinfo.org>2020-05-09 18:38:26 -0700
commit2dbe79d105e7898ee2594e2038052150436eb207 (patch)
tree82a37242f7c0022989fc3d5f3ca12c035e2697b4 /modules/devices.c
parent605f2846ff85de6ed0c2a63e14a341c3c4604a15 (diff)
Update SyncManager to use the new API
Diffstat (limited to 'modules/devices.c')
-rw-r--r--modules/devices.c34
1 files changed, 13 insertions, 21 deletions
diff --git a/modules/devices.c b/modules/devices.c
index 7eae11b9..05d3bf8a 100644
--- a/modules/devices.c
+++ b/modules/devices.c
@@ -830,29 +830,21 @@ guchar hi_module_get_weight(void)
void hi_module_init(void)
{
- if (!g_file_test("/usr/share/misc/pci.ids", G_FILE_TEST_EXISTS)) {
- static SyncEntry se = {
- .fancy_name = N_("Update PCI ID listing"),
- .name = "GetPCIIds",
- .save_to = "pci.ids",
- .get_data = NULL
- };
-
- sync_manager_add_entry(&se);
- }
+ static SyncEntry pci_ids = {
+ .name = N_("Update PCI ID listing"),
+ .file_name = "pci.ids",
+ };
+
+ sync_manager_add_entry(&pci_ids);
#if defined(ARCH_x86) || defined(ARCH_x86_64)
- {
- static SyncEntry se = {
- .fancy_name = N_("Update CPU feature database"),
- .name = "RecvCPUFlags",
- .save_to = "cpuflags.conf",
- .get_data = NULL
- };
-
- sync_manager_add_entry(&se);
- }
-#endif /* defined(ARCH_x86) */
+ static SyncEntry cpuflags_conf = {
+ .name = N_("Update CPU feature database"),
+ .file_name = "cpuflags.conf",
+ };
+
+ sync_manager_add_entry(&cpuflags_conf);
+#endif /* defined(ARCH_x86) */
init_cups();
sensors_init();