mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kinfocenter: obtain PCI info via pciutils if possible on FreeBSD
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3b64183837
commit
368a8a1ec7
1 changed files with 14 additions and 6 deletions
|
@ -18,12 +18,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#ifdef HAVE_DEVINFO_H
|
||||
extern "C" {
|
||||
#include <devinfo.h>
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <QMap>
|
||||
|
@ -34,6 +28,10 @@ extern "C" {
|
|||
void ProcessChildren(QString name);
|
||||
|
||||
#ifdef HAVE_DEVINFO_H
|
||||
extern "C" {
|
||||
#include <devinfo.h>
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
int print_irq(struct devinfo_rman *rman, void *arg);
|
||||
int print_dma(struct devinfo_rman *rman, void *arg);
|
||||
|
@ -42,6 +40,10 @@ extern "C" {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PCIUTILS
|
||||
#include "kpci.h"
|
||||
#endif //HAVE_PCIUTILS
|
||||
|
||||
bool GetInfo_IRQ(QTreeWidget* tree) {
|
||||
#ifdef HAVE_DEVINFO_H
|
||||
/* systat lists the interrupts assigned to devices as well as how many were
|
||||
|
@ -125,6 +127,12 @@ bool GetInfo_SCSI(QTreeWidget* tree) {
|
|||
}
|
||||
|
||||
bool GetInfo_PCI(QTreeWidget* tree) {
|
||||
#ifdef HAVE_PCIUTILS
|
||||
if (GetInfo_PCIUtils(tree)) {
|
||||
return true;
|
||||
}
|
||||
#endif //HAVE_PCIUTILS
|
||||
|
||||
FILE *pipe;
|
||||
QString s;
|
||||
QByteArray cmd;
|
||||
|
|
Loading…
Add table
Reference in a new issue