summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 20:26:45 +0100
committerRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 20:26:45 +0100
commit3194e4e1135ce6eade0e15f8d9b550a5d512bf8b (patch)
tree85f2d5b485fbbc9257f2157ce20e905e300393a5 /src
parentc762e0ad84dcdb5f6582c2a0361f6265cb005e0b (diff)
serial: more info to help remote debugging
Diffstat (limited to 'src')
-rw-r--r--src/Serial.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Serial.cpp b/src/Serial.cpp
index db03114..291b5d2 100644
--- a/src/Serial.cpp
+++ b/src/Serial.cpp
@@ -23,6 +23,10 @@
#include <fstream>
#include "Log.hpp"
+#ifdef __linux__
+# include <sys/utsname.h>
+#endif
+
namespace antpm {
@@ -31,6 +35,13 @@ Serial*
Serial::instantiate(void*)
{
#ifdef __linux__
+ utsname u;
+ int urv = uname(&u);
+ if(urv==0)
+ {
+ LOG(LOG_DBG) << "Running under: " << u.sysname << ", " << u.release << ", " << u.version << ", " << u.machine << "\n";
+ }
+
// check for cp210x kernel module
std::string line;
std::ifstream mods("/proc/modules");