diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-26 13:59:05 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-28 13:33:55 +0200 |
commit | f703e7f5c7082e267558fe2079140869daec8dfd (patch) | |
tree | 075d3c20f5142b3470659532d7bc39350bbc44cb /cpukit | |
parent | riscv32: Add missing preinstall.am (diff) | |
download | rtems-f703e7f5c7082e267558fe2079140869daec8dfd.tar.bz2 |
tests: Move rtems_test_printer definition
Statically initialize it to use printk().
Update #3170.
Update #3199.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/include/rtems/bspIo.h | 6 | ||||
-rw-r--r-- | cpukit/libcsupport/src/printk_plugin.c | 4 | ||||
-rw-r--r-- | cpukit/libmisc/testsupport/testbeginend.c | 7 |
3 files changed, 14 insertions, 3 deletions
diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h index 8ab46afecd..d49fe3a228 100644 --- a/cpukit/include/rtems/bspIo.h +++ b/cpukit/include/rtems/bspIo.h @@ -94,6 +94,12 @@ extern int getchark(void); */ extern int vprintk(const char *fmt, va_list ap); +int rtems_printk_printer( + void *ignored, + const char *format, + va_list ap +); + /** * @brief Kernel Print * diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c index 3b4a911eb2..9676b83978 100644 --- a/cpukit/libcsupport/src/printk_plugin.c +++ b/cpukit/libcsupport/src/printk_plugin.c @@ -21,7 +21,7 @@ #include <rtems/printer.h> #include <rtems/bspIo.h> -static int printk_plugin( +int rtems_printk_printer( void *ignored, const char *format, va_list ap @@ -37,5 +37,5 @@ void rtems_print_printer_printk( ) { printer->context = NULL; - printer->printer = printk_plugin; + printer->printer = rtems_printk_printer; } diff --git a/cpukit/libmisc/testsupport/testbeginend.c b/cpukit/libmisc/testsupport/testbeginend.c index cc00c8f0a9..ff64851c02 100644 --- a/cpukit/libmisc/testsupport/testbeginend.c +++ b/cpukit/libmisc/testsupport/testbeginend.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 embedded brains GmbH. All rights reserved. + * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -17,6 +17,11 @@ #endif #include <rtems/test.h> +#include <rtems/bspIo.h> + +rtems_printer rtems_test_printer = { + .printer = rtems_printk_printer +}; int rtems_test_begin(void) { |