[Pkg-running-devel] [antpm] 10/20: tty: clarify intent
Kristof Ralovich
ralovich-guest at moszumanska.debian.org
Sun Jun 28 12:26:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
ralovich-guest pushed a commit to branch upstream
in repository antpm.
commit 86e2e304252ed113214b99f3e04fe2bf2cdefc72
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date: Sun May 31 19:07:17 2015 +0200
tty: clarify intent
---
src/SerialTty.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
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";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git
More information about the Pkg-running-devel
mailing list