mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
solid: fix check that CPU is valid
upstream commit:
f55f25fc72
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
dfca8f29f6
commit
b96da9aad3
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
using namespace Solid::Backends::UDev;
|
||||
|
@ -99,7 +100,8 @@ bool UDevManager::Private::checkOfInterest(const UdevQt::Device &device)
|
|||
if (device.driver() == QLatin1String("processor")) {
|
||||
// Linux ACPI reports processor slots, rather than processors.
|
||||
// Empty slots will not have a system device associated with them.
|
||||
return QFile::exists(device.sysfsPath() + "/sysdev") || QFile::exists(device.sysfsPath() + "/cpufreq");
|
||||
QDir sysfsDir(device.sysfsPath());
|
||||
return (sysfsDir.exists("sysdev") || sysfsDir.exists("cpufreq") || sysfsDir.exists("topology/core_id"));
|
||||
}
|
||||
if (device.subsystem() == QLatin1String("sound") &&
|
||||
device.deviceProperty("SOUND_FORM_FACTOR").toString() != "internal") {
|
||||
|
|
Loading…
Add table
Reference in a new issue