summaryrefslogtreecommitdiff
path: root/src/system/dlt-system-log.c
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-10-04 17:34:25 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-10-04 17:34:25 +0200
commit71a7aae2c7e3451293ad7e96b07efa5329e12b86 (patch)
treef2d75b369ca4f5ec9fb44e9a19566e70d87735d3 /src/system/dlt-system-log.c
parentc37ecb5031eebc36bfba8be0d741ec858e8898f7 (diff)
downloadDLT-daemon-71a7aae2c7e3451293ad7e96b07efa5329e12b86.tar.gz
First version of DLT system mamager.
Diffstat (limited to 'src/system/dlt-system-log.c')
-rw-r--r--src/system/dlt-system-log.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/system/dlt-system-log.c b/src/system/dlt-system-log.c
new file mode 100644
index 0000000..45ac901
--- /dev/null
+++ b/src/system/dlt-system-log.c
@@ -0,0 +1,31 @@
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "dlt_common.h"
+#include "dlt_user.h"
+
+#include "dlt-system.h"
+#include "dlt-system_cfg.h"
+#include "dlt-system-log.h"
+
+void dlt_system_log_kernel_version(DltContext *context) {
+ FILE * pFile;
+ char buffer[1024];
+ int bytes;
+
+ pFile = fopen("/proc/version","r");
+
+ if(pFile>0)
+ {
+ bytes = fread(buffer,1,sizeof(buffer)-1,pFile);
+
+ fclose(pFile);
+
+ if(bytes>0) {
+ buffer[bytes] = 0;
+ DLT_LOG(*context, DLT_LOG_INFO, DLT_STRING(buffer));
+ }
+ }
+}