[rtems commit] Make printk_plugin() static

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


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

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

Make printk_plugin() static

---

 cpukit/include/rtems/bspIo.h           | 10 ----------
 cpukit/libcsupport/src/printk_plugin.c | 19 +++++++++----------
 2 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h
index a7fd959..958103a 100644
--- a/cpukit/include/rtems/bspIo.h
+++ b/cpukit/include/rtems/bspIo.h
@@ -142,16 +142,6 @@ extern void rtems_putc(char c);
 typedef int (*rtems_print_plugin_t)(void *, const char *format, va_list ap);
 
 /**
- * @brief Reporting Methods printk() Plugin
- *
- * @param[in] context Unused.
- * @param[in] fmt is a printf()-style format string
- *
- * @return The number of characters printed.
- */
-extern int printk_plugin(void *context, const char *fmt, va_list ap);
-
-/**
  * @brief Reporting Methods printf() Plugin
  *
  * This is a standard plug-in to support using printf() for output
diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c
index 3ecacb8..485346d 100644
--- a/cpukit/libcsupport/src/printk_plugin.c
+++ b/cpukit/libcsupport/src/printk_plugin.c
@@ -18,18 +18,9 @@
 #include "config.h"
 #endif
 
-#include <stdarg.h>
 #include <rtems/print.h>
 
-void rtems_print_printer_printk(
-  rtems_printer *printer
-)
-{
-  printer->context = NULL;
-  printer->printer = printk_plugin;
-}
-
-int printk_plugin(
+static int printk_plugin(
   void *ignored,
   const char *format,
   va_list ap
@@ -39,3 +30,11 @@ int printk_plugin(
   vprintk( format, ap );
   return 0;
 }
+
+void rtems_print_printer_printk(
+  rtems_printer *printer
+)
+{
+  printer->context = NULL;
+  printer->printer = printk_plugin;
+}



More information about the vc mailing list