aboutsummaryrefslogtreecommitdiff
path: root/modules/devices.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2020-01-03 19:18:21 -0600
committerLeandro A. F. Pereira <leandro@hardinfo.org>2020-01-04 10:40:36 -0800
commit8b90f545215092480a39f77deaa2ea12d9a64945 (patch)
tree5086d2abec8ac5c2e939b7ba80f9a5633ba6abb4 /modules/devices.c
parentf6ef98fcc1024bd715f1d12e79e63b068be2a636 (diff)
pci: include a minimum pci.ids with classes, note when pci.ids is missing
Noticed that the RPi4 has a PCIe bus, but pci.ids is not included with the standard Raspbian image, so everything is "(Unknown)." Now there will be some basic information about what the device is, and a note about installing pci.ids for more information. Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices.c')
-rw-r--r--modules/devices.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/devices.c b/modules/devices.c
index 429dd6b6..63cbaef4 100644
--- a/modules/devices.c
+++ b/modules/devices.c
@@ -887,6 +887,16 @@ gchar **hi_module_get_dependencies(void)
const gchar *hi_note_func(gint entry)
{
+ if (entry == ENTRY_PCI
+ || entry == ENTRY_GPU) {
+ const gchar *ids = find_pci_ids_file();
+ if (!ids) {
+ return g_strdup(_("A copy of <i><b>pci.ids</b></i> is not available on the system."));
+ }
+ if (ids && strstr(ids, ".min")) {
+ return g_strdup(_("A full <i><b>pci.ids</b></i> is not available on the system."));
+ }
+ }
if (entry == ENTRY_RESOURCES) {
if (root_required_for_resources()) {
return g_strdup(_("Resource information requires superuser privileges"));