I'm testing KInfoCenter on an ARM64 device (Orange Pi Prime, Allwinner H5) which doesn't have any PCI bus, and the Linux kernel also doesn't have PCI support. When switching to the PCI page of KInfoCenter, the program exits with status code 1, and printed the following string on the terminal: ``` pcilib: Cannot open /proc/bus/pci pcilib: Cannot find any working access method. ```
If the pcilib only works on systems that actually have a PCI bus, then you should compile KInfoCenter without pcilib/pciutils dependency.
(In reply to Christoph Feck from comment #1) > If the pcilib only works on systems that actually have a PCI bus, then you > should compile KInfoCenter without pcilib/pciutils dependency. However, some ARM devices also come with PCI(e), and for these devices PCI info is needed. I think KInfoCenter should give a empty page on devices without PCI, like other not-so-usual buses (e.g. IEEE1394); directly exit is not a good behavior.
I have not investigated properly, but it is possible the exit() is caused by pcilib, not KInfoCenter.
(In reply to Christoph Feck from comment #3) > I have not investigated properly, but it is possible the exit() is caused by > pcilib, not KInfoCenter. Yes, but the behavior can be overrided by the program that calls pcilib. See https://github.com/pciutils/pciutils/blob/master/lib/init.c, the function that calls exit() is pci_generic_error(), which is just a fallback implementation of the error function pointer in struct pci_access populated in pci_init_v35() (which is exported as pci_init() in the shared library). KInfoCenter should add overrided functions for at least the error function pointer, and if possible, also override the warning function pointer.
Git commit e677d2cc1b57ae081b1add1a820d61c35448cf9f by Harald Sitter. Committed on 22/01/2020 at 17:14. Pushed by sitter into branch 'Plasma/5.18'. override picutils' error logger; it has an exit() call Summary: instead simply run the output through qwarning as a cheap solution. FIXED-IN: 5.18.0 Test Plan: builds, dont have a device without pci Reviewers: ngraham Reviewed By: ngraham Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D26807 M +12 -0 Modules/pci/kpci.cpp https://commits.kde.org/kinfocenter/e677d2cc1b57ae081b1add1a820d61c35448cf9f
*** Bug 343491 has been marked as a duplicate of this bug. ***