summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--pci.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 83f77e2..93f386d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- don't exit(1) on systems without pci (eg: ARM) (rtp)
+
Version 0.11.1 - 1 December 2009, Thierry Vignaud
- do not crash if there're more than 100 PCI devices
diff --git a/pci.c b/pci.c
index 5bd344f..dda2866 100644
--- a/pci.c
+++ b/pci.c
@@ -37,6 +37,11 @@ extern struct pciusb_entries pci_probe(void) {
struct pci_dev *dev;
char classbuf[128], vendorbuf[128], devbuf[128];
+ r.nb = 0;
+ if ((access(proc_pci_path_default, R_OK) != 0)
+ || (proc_pci_path && (access(proc_pci_path_default, R_OK) != 0)))
+ return r;
+
pacc = pci_alloc();
if (proc_pci_path) {