From 8e467d8b605da6ada6e6896a87116c2522734efd Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 4 Oct 2012 15:31:24 -0500 Subject: Report serial number of ARM processor --- tdecore/tdehardwaredevices.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tdecore') 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); } } } -- cgit v1.2.1