summaryrefslogtreecommitdiffstats
path: root/src/sysinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysinfo.cpp')
-rw-r--r--src/sysinfo.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index c9bb0e8..e942e94 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -61,7 +61,8 @@ const QString SysInfo::getInfo(const QString& infoName) {
*/
const QString SysInfo::getMainboardSerial() {
QString out = "";
- struct sysfs_class_device *class_device = sysfs_open_class_device("dmi", "id");
+ struct sysfs_class_device *class_device = sysfs_open_class_device("dmi",
+ "id");
struct dlist *attrlist = sysfs_get_classdev_attributes(class_device);
struct sysfs_device *device = sysfs_get_classdev_device(class_device);
@@ -104,6 +105,7 @@ const QString SysInfo::getMainboardSerial() {
* @see SysInfo::getInfo(const QString& infoName)
*/
const QString SysInfo::getUsbVendorIdProductIdSerialNumber() {
+
QString tag = "[sysinfo] Usb Serial:";
QString out = "";
QVariantList list;
@@ -142,19 +144,22 @@ const QString SysInfo::getUsbVendorIdProductIdSerialNumber() {
qxtLog->debug() << tag + "failed to get handler / fail to open device";
return "error";
}
- re = libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber, string, sizeof(string));
+ re = libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber,
+ string, sizeof(string));
if (re < 0) {
qxtLog->debug() << tag + "failed to get SerialNumber";
return "error";
}
infos.insert("serialnumber", QString((const char *) string));
- re = libusb_get_string_descriptor_ascii(handle, desc.iProduct, string, sizeof(string));
+ re = libusb_get_string_descriptor_ascii(handle, desc.iProduct, string,
+ sizeof(string));
if (re < 0) {
qxtLog->debug() << tag + "failed to get Product";
return "error";
}
infos.insert("product", QString((const char *) string));
- re = libusb_get_string_descriptor_ascii(handle, desc.iManufacturer, string, sizeof(string));
+ re = libusb_get_string_descriptor_ascii(handle, desc.iManufacturer,
+ string, sizeof(string));
if (re < 0) {
qxtLog->debug() << tag + "failed to get Product";
return "error";