[rtems commit] Make rtems_printf_plugin() static

Sebastian Huber sebh at rtems.org
Wed Jun 22 05:46:10 UTC 2016


Module:    rtems
Branch:    master
Commit:    1ce8fc32c3e28f6ffd34d4802710c5245ec7ffcc
Changeset: http://git.rtems.org/rtems/commit/?id=1ce8fc32c3e28f6ffd34d4802710c5245ec7ffcc

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jun 21 13:05:18 2016 +0200

Make rtems_printf_plugin() static

---

 cpukit/include/rtems/bspIo.h           | 13 -------------
 cpukit/libcsupport/src/printf_plugin.c | 12 ++++++------
 2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h
index 958103a..fad4e9d 100644
--- a/cpukit/include/rtems/bspIo.h
+++ b/cpukit/include/rtems/bspIo.h
@@ -142,19 +142,6 @@ extern void rtems_putc(char c);
 typedef int (*rtems_print_plugin_t)(void *, const char *format, va_list ap);
 
 /**
- * @brief Reporting Methods printf() Plugin
- *
- * This is a standard plug-in to support using printf() for output
- * instead of printk().
- *
- * @param[in] context Unused.
- * @param[in] fmt is a printf()-style format string
- *
- * @return The number of characters printed.
- */
-extern int rtems_printf_plugin(void *context, const char *fmt, va_list ap);
-
-/**
  * @brief Reporting Methods fprintf() Plugin
  *
  * This is a standard plug-in to support using fprintf() for output
diff --git a/cpukit/libcsupport/src/printf_plugin.c b/cpukit/libcsupport/src/printf_plugin.c
index 097e412..23ac9f6 100644
--- a/cpukit/libcsupport/src/printf_plugin.c
+++ b/cpukit/libcsupport/src/printf_plugin.c
@@ -27,14 +27,14 @@
 
 #include <stdio.h>
 
-void rtems_print_printer_printf(rtems_printer *printer)
+static int rtems_printf_plugin(void *context, const char *format, va_list ap)
 {
-  printer->context = NULL;
-  printer->printer = rtems_printf_plugin;
+  (void) context;
+  return vprintf(format, ap);
 }
 
-int rtems_printf_plugin(void *context, const char *format, va_list ap)
+void rtems_print_printer_printf(rtems_printer *printer)
 {
-  (void) context;
-  return vprintf(format, ap);
+  printer->context = NULL;
+  printer->printer = rtems_printf_plugin;
 }




More information about the vc mailing list