diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-07-29 20:06:48 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-07-29 20:06:48 +0000 |
commit | c394e9e51c4867c42d4082623f84ad92ed80463b (patch) | |
tree | dd59b23f5f9198cb8268765133396d1d364f2b3d /hardinfo2/devices.c | |
parent | 058f63cb3c49c53b0798ea61f92ab44c93a968ee (diff) |
Make it possible to update the PCI ID file. Will only show up if the default one (/usr/share/misc/pci.ids) is missing.
Diffstat (limited to 'hardinfo2/devices.c')
-rw-r--r-- | hardinfo2/devices.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/hardinfo2/devices.c b/hardinfo2/devices.c index e1ccf6c9..6221769c 100644 --- a/hardinfo2/devices.c +++ b/hardinfo2/devices.c @@ -23,6 +23,7 @@ #include <hardinfo.h> #include <shell.h> #include <iconcache.h> +#include <syncmanager.h> #include <expr.h> #include <socket.h> @@ -346,8 +347,20 @@ guchar hi_module_get_weight(void) void hi_module_init(void) { - moreinfo = - g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); + if (!g_file_test("/usr/share/misc/pci.ids", G_FILE_TEST_EXISTS)) { + static SyncEntry se[] = { + { + .fancy_name = "Update PCI ID listing", + .name = "GetPCIIds", + .save_to = "pci.ids", + .get_data = NULL + } + }; + + sync_manager_add_entry(&se[0]); + } + + moreinfo = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); __init_memory_labels(); } |