diff options
author | RALOVICH, Kristof <tade60@freemail.hu> | 2015-05-31 19:07:17 +0200 |
---|---|---|
committer | RALOVICH, Kristof <tade60@freemail.hu> | 2015-05-31 19:07:17 +0200 |
commit | 86e2e304252ed113214b99f3e04fe2bf2cdefc72 (patch) | |
tree | 672c79487a9e98761f4098c78eb0db2b8be3ed1e | |
parent | 6854e42db0547f68157bed3293222b312365ac64 (diff) |
tty: clarify intent
-rw-r--r-- | src/SerialTty.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SerialTty.cpp b/src/SerialTty.cpp index 24194e2..7126eff 100644 --- a/src/SerialTty.cpp +++ b/src/SerialTty.cpp @@ -173,7 +173,9 @@ SerialTtyPrivate::guessDeviceName(vector<string> &guessedNames) std::ifstream mods("/proc/modules"); bool cp210x_found=false; if(!mods.is_open()) + { LOG(LOG_WARN) << "Could not open /proc/modules!\n"; + } else { while (mods.good()) @@ -184,9 +186,13 @@ SerialTtyPrivate::guessDeviceName(vector<string> &guessedNames) } mods.close(); if(cp210x_found) + { LOG(LOG_DBG) << "Found loaded cp210x kernel module, good.\n"; + } else + { LOG(LOG_WARN) << "cp210x is not listed among loaded kernel modules!\n"; + } } // check for usb ids inside /sys/bus/usb/devices/N-N/idProduct|idVendor @@ -195,7 +201,9 @@ SerialTtyPrivate::guessDeviceName(vector<string> &guessedNames) // check /sys/bus/usb/drivers/cp210x/6-2:1.0/interface for "Dynastream ANT2USB" const char* driverDir="/sys/bus/usb/drivers/cp210x"; if(!folderExists(driverDir)) + { LOG(LOG_WARN) << driverDir << " doesn't exist!\n"; + } else { LOG(LOG_DBG) << "Detecting in " << driverDir << " ...\n"; |