summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-04 15:31:24 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-04 15:31:24 -0500
commit8e467d8b605da6ada6e6896a87116c2522734efd (patch)
treeb08588ad4248c8126296c24f07ffc2eec535c7c4 /tdecore/tdehardwaredevices.cpp
parent10070eb92e8247688779852d7214771b9dcdda13 (diff)
downloadtdelibs-8e467d8b605da6ada6e6896a87116c2522734efd.tar.gz
tdelibs-8e467d8b605da6ada6e6896a87116c2522734efd.zip
Report serial number of ARM processor
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehardwaredevices.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index 2e6ebf68d..8dc208f0c 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -2118,6 +2118,7 @@ void TDEHardwareDevices::processModifiedCPUs() {
TQStringList::Iterator cpuit;
TQString modelName;
TQString vendorName;
+ TQString serialNumber;
for (cpuit = m_cpuInfo.begin(); cpuit != m_cpuInfo.end(); ++cpuit) {
curline = *cpuit;
if (curline.startsWith("Processor")) {
@@ -2130,6 +2131,11 @@ void TDEHardwareDevices::processModifiedCPUs() {
curline = curline.stripWhiteSpace();
vendorName = curline;
}
+ if (curline.startsWith("Serial")) {
+ curline.remove(0, curline.find(":")+1);
+ curline = curline.stripWhiteSpace();
+ serialNumber = curline;
+ }
}
for (TQStringList::Iterator cpuit = m_cpuInfo.begin(); cpuit != m_cpuInfo.end(); ++cpuit) {
curline = *cpuit;
@@ -2147,6 +2153,8 @@ void TDEHardwareDevices::processModifiedCPUs() {
cdevice->internalSetVendorName(vendorName);
if (cdevice->vendorEncoded() != vendorName) modified = true;
cdevice->internalSetVendorEncoded(vendorName);
+ if (cdevice->serialNumber() != serialNumber) modified = true;
+ cdevice->internalSetSerialNumber(serialNumber);
}
}
}