diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 11:34:22 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 11:34:22 -0600 |
commit | 59ac0e4d0352fad72b80018438e350ba405294b5 (patch) | |
tree | e11ebcb862370c10e4d8633d77673d4377d51a66 /apps/system/stackmonitor | |
parent | 68c842108f9509299434ceb6f1595f0e4ddd4505 (diff) | |
download | px4-nuttx-59ac0e4d0352fad72b80018438e350ba405294b5.tar.gz px4-nuttx-59ac0e4d0352fad72b80018438e350ba405294b5.tar.bz2 px4-nuttx-59ac0e4d0352fad72b80018438e350ba405294b5.zip |
Update everything under apps/ to use the corrected syslog interfaces
Diffstat (limited to 'apps/system/stackmonitor')
-rw-r--r-- | apps/system/stackmonitor/stackmonitor.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/system/stackmonitor/stackmonitor.c b/apps/system/stackmonitor/stackmonitor.c index 8587fda63..094ced4b5 100644 --- a/apps/system/stackmonitor/stackmonitor.c +++ b/apps/system/stackmonitor/stackmonitor.c @@ -98,17 +98,17 @@ static struct stkmon_state_s g_stackmonitor; static void stkmon_task(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NAME_MAX > 0 - syslog("%5d %6d %6d %s\n", + syslog(LOG_INFO, ("%5d %6d %6d %s\n", tcb->pid, tcb->adj_stack_size, up_check_tcbstack(tcb), tcb->name); #else - syslog("%5d %6d %6d\n", + syslog(LOG_INFO, ("%5d %6d %6d\n", tcb->pid, tcb->adj_stack_size, up_check_tcbstack(tcb)); #endif } static int stackmonitor_daemon(int argc, char **argv) { - syslog(STKMON_PREFIX "Running: %d\n", g_stackmonitor.pid); + syslog(LOG_INFO, (STKMON_PREFIX "Running: %d\n", g_stackmonitor.pid); /* Loop until we detect that there is a request to stop. */ @@ -116,9 +116,9 @@ static int stackmonitor_daemon(int argc, char **argv) { sleep(CONFIG_SYSTEM_STACKMONITOR_INTERVAL); #if CONFIG_NAME_MAX > 0 - syslog("%-5s %-6s %-6s %s\n", "PID", "SIZE", "USED", "THREAD NAME"); + syslog(LOG_INFO, ("%-5s %-6s %-6s %s\n", "PID", "SIZE", "USED", "THREAD NAME"); #else - syslog("%-5s %-6s %-6s\n", "PID", "SIZE", "USED"); + syslog(LOG_INFO, ("%-5s %-6s %-6s\n", "PID", "SIZE", "USED"); #endif sched_foreach(stkmon_task, NULL); } @@ -127,7 +127,7 @@ static int stackmonitor_daemon(int argc, char **argv) g_stackmonitor.stop = false; g_stackmonitor.started = false; - syslog(STKMON_PREFIX "Stopped: %d\n", g_stackmonitor.pid); + syslog(LOG_INFO, (STKMON_PREFIX "Stopped: %d\n", g_stackmonitor.pid); return 0; } @@ -158,14 +158,14 @@ int stackmonitor_start(int argc, char **argv) if (ret < 0) { int errcode = errno; - syslog(STKMON_PREFIX + syslog(LOG_INFO, (STKMON_PREFIX "ERROR: Failed to start the stack monitor: %d\n", errcode); } else { g_stackmonitor.pid = ret; - syslog(STKMON_PREFIX "Started: %d\n", g_stackmonitor.pid); + syslog(LOG_INFO, (STKMON_PREFIX "Started: %d\n", g_stackmonitor.pid); } sched_unlock(); @@ -173,7 +173,7 @@ int stackmonitor_start(int argc, char **argv) } sched_unlock(); - syslog(STKMON_PREFIX "%s: %d\n", + syslog(LOG_INFO, (STKMON_PREFIX "%s: %d\n", g_stackmonitor.stop ? "Stopping" : "Running", g_stackmonitor.pid); return 0; } @@ -188,11 +188,11 @@ int stackmonitor_stop(int argc, char **argv) * it will see the the stop indication and will exist. */ - syslog(STKMON_PREFIX "Stopping: %d\n", g_stackmonitor.pid); + syslog(LOG_INFO, (STKMON_PREFIX "Stopping: %d\n", g_stackmonitor.pid); g_stackmonitor.stop = true; } - syslog(STKMON_PREFIX "Stopped: %d\n", g_stackmonitor.pid); + syslog(LOG_INFO, (STKMON_PREFIX "Stopped: %d\n", g_stackmonitor.pid); return 0; } |