[rtems commit] shell: Print to stderr in TIME command
Sebastian Huber
sebh at rtems.org
Thu Nov 20 13:53:25 UTC 2014
Module: rtems
Branch: master
Commit: 66da4844f4766b2440b77e5da7fa27af144f89d6
Changeset: http://git.rtems.org/rtems/commit/?id=66da4844f4766b2440b77e5da7fa27af144f89d6
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Nov 18 10:09:30 2014 +0100
shell: Print to stderr in TIME command
---
cpukit/libmisc/shell/main_time.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpukit/libmisc/shell/main_time.c b/cpukit/libmisc/shell/main_time.c
index dadcd85..e574647 100644
--- a/cpukit/libmisc/shell/main_time.c
+++ b/cpukit/libmisc/shell/main_time.c
@@ -49,7 +49,7 @@ static int rtems_shell_main_time(
sc = rtems_clock_get_uptime(&start);
if (sc != RTEMS_SUCCESSFUL)
- printf("error: cannot read time\n");
+ fprintf(stderr, "error: cannot read time\n");
if (argc) {
shell_cmd = rtems_shell_lookup_cmd(argv[1]);
@@ -64,7 +64,7 @@ static int rtems_shell_main_time(
sc = rtems_clock_get_uptime(&end);
if (sc != RTEMS_SUCCESSFUL)
- printf("error: cannot read time\n");
+ fprintf(stderr, "error: cannot read time\n");
period.tv_sec = end.tv_sec - start.tv_sec;
period.tv_nsec = end.tv_nsec - start.tv_nsec;
@@ -74,7 +74,7 @@ static int rtems_shell_main_time(
period.tv_nsec += 1000000000UL;
}
- printf("time: %" PRIdtime_t ":%02" PRIdtime_t ":%02" PRIdtime_t ".%03li\n",
+ fprintf(stderr, "time: %" PRIdtime_t ":%02" PRIdtime_t ":%02" PRIdtime_t ".%03li\n",
period.tv_sec / 3600,
period.tv_sec / 60, period.tv_sec % 60,
period.tv_nsec / 1000000);
More information about the vc
mailing list