Commit e677d2cc authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

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
BUG: 382979

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
parent 47ec0bda
......@@ -21,6 +21,7 @@ extern "C" {
#include <string.h> //memcpy
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QDebug>
static const QString& getNameById(const id2name *const table, int id) {
for (int i=0;; i++) {
......@@ -698,6 +699,14 @@ static QTreeWidgetItem* addCaps(QTreeWidgetItem *parent, QTreeWidgetItem *after,
return after;
}//addCaps
static void pci_warning(char *msg, ...)
{
va_list args;
va_start(args, msg);
qWarning(msg, args);
va_end(args);
}
bool GetInfo_PCIUtils(QTreeWidget* tree) {
QStringList headers;
......@@ -713,6 +722,9 @@ bool GetInfo_PCIUtils(QTreeWidget* tree) {
if (PCIAccess==nullptr) {
return false;
}//if
// Use warnings for errors, they are decidely not fatal for us!
// https://bugs.kde.org/show_bug.cgi?id=382979
PCIAccess->error = pci_warning;
pci_init(PCIAccess);
pci_scan_bus(PCIAccess);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment