summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorLutz Helwing <lutz_helwing@mentor.com>2015-07-13 16:52:14 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2015-07-21 12:48:27 +0200
commit98e932adee2a76bda3c2630f348196216549a45a (patch)
tree1658983ac5940b71c158da20421db9054f9500ca /src/system
parent199ff0e7f736d848a7e01a12f04ddb21ecf36d74 (diff)
downloadDLT-daemon-98e932adee2a76bda3c2630f348196216549a45a.tar.gz
Removed all trailing whitespaces
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/system')
-rw-r--r--src/system/CMakeLists.txt4
-rw-r--r--src/system/dlt-system-journal.c36
-rw-r--r--src/system/dlt-system-shell.c10
-rw-r--r--src/system/dlt-system.conf14
4 files changed, 32 insertions, 32 deletions
diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt
index fb11624..2213867 100644
--- a/src/system/CMakeLists.txt
+++ b/src/system/CMakeLists.txt
@@ -19,7 +19,7 @@ if(WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD OR WITH_SYSTEMD_JOURNAL)
message( STATUS "Added ${systemd_SRCS} to dlt-system")
endif(WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD OR WITH_SYSTEMD_JOURNAL)
-set(dlt_system_SRCS dlt-system.c dlt-system-options.c dlt-system-process-handling.c
+set(dlt_system_SRCS dlt-system.c dlt-system-options.c dlt-system-process-handling.c
dlt-system-filetransfer.c dlt-system-logfile.c dlt-system-processes.c dlt-system-shell.c
dlt-system-syslog.c dlt-system-watchdog.c dlt-system-journal.c)
add_executable(dlt-system ${dlt_system_SRCS} ${systemd_SRCS})
@@ -28,7 +28,7 @@ if(WITH_SYSTEMD_JOURNAL)
else(WITH_SYSTEMD_JOURNAL)
target_link_libraries(dlt-system dlt ${ZLIB_LIBRARIES})
endif(WITH_SYSTEMD_JOURNAL)
-
+
set_target_properties(dlt-system PROPERTIES LINKER_LANGUAGE C)
diff --git a/src/system/dlt-system-journal.c b/src/system/dlt-system-journal.c
index 7cccb4b..03c785c 100644
--- a/src/system/dlt-system-journal.c
+++ b/src/system/dlt-system-journal.c
@@ -150,7 +150,7 @@ void journal_thread(void *v_conf)
buffer_transport[DLT_SYSTEM_JOURNAL_BUFFER_SIZE];
int loglevel,systemd_loglevel;
char* systemd_log_levels[] = { "Emergency","Alert","Critical","Error","Warning","Notice","Informational","Debug" };
-
+
DLT_LOG(dltsystem, DLT_LOG_DEBUG,
DLT_STRING("dlt-system-journal, in thread."));
@@ -158,14 +158,14 @@ void journal_thread(void *v_conf)
DLT_REGISTER_CONTEXT(journalContext, conf->Journal.ContextId, "Journal Adapter");
r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY/*SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_RUNTIME_ONLY*/);
- printf("journal open return %d\n", r);
+ printf("journal open return %d\n", r);
if (r < 0) {
DLT_LOG(dltsystem, DLT_LOG_ERROR,
DLT_STRING("dlt-system-journal, cannot open journal:"),DLT_STRING(strerror(-r)));
printf("journal open failed: %s\n", strerror(-r));
return;
}
-
+
if(conf->Journal.CurrentBoot)
{
/* show only current boot entries */
@@ -176,7 +176,7 @@ void journal_thread(void *v_conf)
DLT_STRING("dlt-system-journal failed to get boot id:"),DLT_STRING(strerror(-r)));
sd_journal_close(j);
return;
-
+
}
sd_id128_to_string(boot_id, match + 9);
r = sd_journal_add_match(j,match,strlen(match));
@@ -186,9 +186,9 @@ void journal_thread(void *v_conf)
DLT_STRING("dlt-system-journal failed to get match:"),DLT_STRING(strerror(-r)));
sd_journal_close(j);
return;
-
+
}
- }
+ }
if(conf->Journal.Follow)
{
@@ -200,7 +200,7 @@ void journal_thread(void *v_conf)
DLT_STRING("dlt-system-journal failed to seek to tail:"),DLT_STRING(strerror(-r)));
sd_journal_close(j);
return;
-
+
}
r = sd_journal_previous_skip(j, 10);
if(r<0)
@@ -209,13 +209,13 @@ void journal_thread(void *v_conf)
DLT_STRING("dlt-system-journal failed to seek back 10 entries:"),DLT_STRING(strerror(-r)));
sd_journal_close(j);
return;
-
+
}
-
+
}
-
+
while(!threads.shutdown)
- {
+ {
r = sd_journal_next(j);
if(r<0)
@@ -224,7 +224,7 @@ void journal_thread(void *v_conf)
DLT_STRING("dlt-system-journal failed to get next entry:"),DLT_STRING(strerror(-r)));
sd_journal_close(j);
return;
-
+
}
else if(r>0)
{
@@ -236,7 +236,7 @@ void journal_thread(void *v_conf)
DLT_STRING("dlt-system-journal failed to call sd_journal_get_realtime_usec(): "),DLT_STRING(strerror(-r)));
sd_journal_close(j);
return;
-
+
}
/* get data from journal entry, empty string if invalid fields */
@@ -287,12 +287,12 @@ void journal_thread(void *v_conf)
loglevel = DLT_LOG_INFO;
break;
}
- }
+ }
if(systemd_loglevel>=0 && systemd_loglevel<=7)
snprintf(buffer_priority,DLT_SYSTEM_JOURNAL_BUFFER_SIZE,"%s:",systemd_log_levels[systemd_loglevel]);
else
snprintf(buffer_priority,DLT_SYSTEM_JOURNAL_BUFFER_SIZE,"prio_unknown:");
-
+
/* write log entry */
DLT_LOG(journalContext, loglevel,
DLT_STRING(buffer_time),DLT_STRING(buffer_process),DLT_STRING(buffer_priority),DLT_STRING(buffer_message));
@@ -300,17 +300,17 @@ void journal_thread(void *v_conf)
}
else
{
- r = sd_journal_wait(j,1000000);
+ r = sd_journal_wait(j,1000000);
if(r<0)
{
DLT_LOG(dltsystem, DLT_LOG_ERROR,
DLT_STRING("dlt-system-journal failed to call sd_journal_get_realtime_usec(): "),DLT_STRING(strerror(-r)));
sd_journal_close(j);
return;
-
+
}
}
-
+
if(journal_checkUserBufferForFreeSpace()==-1)
{
// buffer is nearly full
diff --git a/src/system/dlt-system-shell.c b/src/system/dlt-system-shell.c
index a235fde..8dce12e 100644
--- a/src/system/dlt-system-shell.c
+++ b/src/system/dlt-system-shell.c
@@ -67,7 +67,7 @@ DLT_DECLARE_CONTEXT(shellContext)
int dlt_shell_injection_callback(uint32_t service_id, void *data, uint32_t length)
{
(void) length;
-
+
DLT_LOG(shellContext,DLT_LOG_DEBUG,
DLT_STRING("dlt-system-shell, injection callback"));
char text[DLT_SHELL_COMMAND_MAX_LENGTH];
@@ -76,14 +76,14 @@ int dlt_shell_injection_callback(uint32_t service_id, void *data, uint32_t lengt
if(length<=DLT_SHELL_COMMAND_MAX_LENGTH-1)
{
strncpy(text,data,length);
- text[length] = 0;
+ text[length] = 0;
}
else
{
strncpy(text,data,DLT_SHELL_COMMAND_MAX_LENGTH-1);
- text[DLT_SHELL_COMMAND_MAX_LENGTH-1] = 0;
+ text[DLT_SHELL_COMMAND_MAX_LENGTH-1] = 0;
}
-
+
DLT_LOG(shellContext,DLT_LOG_DEBUG,
DLT_STRING("dlt-system-shell, injection injection id:"),
DLT_UINT32(service_id));
@@ -105,7 +105,7 @@ int dlt_shell_injection_callback(uint32_t service_id, void *data, uint32_t lengt
{
DLT_LOG(shellContext,DLT_LOG_INFO,
DLT_STRING("Shell command executed:"),
- DLT_STRING(text));
+ DLT_STRING(text));
}
break;
default:
diff --git a/src/system/dlt-system.conf b/src/system/dlt-system.conf
index 7d5b0c0..1097b2c 100644
--- a/src/system/dlt-system.conf
+++ b/src/system/dlt-system.conf
@@ -2,14 +2,14 @@
#
########################################################################
-# General configuration
+# General configuration
########################################################################
# The application Id used for the System manager (Default: SYS)
ApplicationId = SYS
########################################################################
-# Shell configuration
+# Shell configuration
########################################################################
# Be careful when you enable this feature. The user can send any kind of
@@ -20,7 +20,7 @@ ApplicationId = SYS
ShellEnable = 0
########################################################################
-# Syslog Adapter configuration
+# Syslog Adapter configuration
########################################################################
# Enable the Syslog Adapter (Default: 0)
@@ -33,7 +33,7 @@ SyslogContextId = SYSL
SyslogPort = 47111
########################################################################
-# Systemd Journal Adapter configuration
+# Systemd Journal Adapter configuration
########################################################################
# This feature is only available, when dlt is compiled with
@@ -70,7 +70,7 @@ JournalFollow = 0
JournalMapLogLevels = 1
########################################################################
-# Filetransfer Manager
+# Filetransfer Manager
########################################################################
# Enable the Filetransfer (Default: 0)
@@ -111,7 +111,7 @@ FiletransferCompressionLevel = 5
########################################################################
-# Log short files, especially from proc filesystem
+# Log short files, especially from proc filesystem
########################################################################
# Enable the logging of files (Default: 0)
@@ -170,7 +170,7 @@ LogFileContextId = STAT
# LogFileContextId = IOM
########################################################################
-# Log Processes
+# Log Processes
########################################################################
# Enable the logging of processes (Default: 0)