Changeset 3242614 in rtems


Ignore:
Timestamp:
May 31, 2016, 7:44:49 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5e072f6d
Parents:
a9cff51b
git-author:
Sebastian Huber <sebastian.huber@…> (05/31/16 07:44:49)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/31/16 08:10:36)
Message:

Fix rtems_print_printer_fprintf()

We must use vfprintf().

Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/bspIo.h

    ra9cff51b r3242614  
    145145 * @brief Reporting Methods printk() Plugin
    146146 *
    147  * @param[in] context points to a user defined context.
     147 * @param[in] context Unused.
    148148 * @param[in] fmt is a printf()-style format string
    149149 *
     
    158158 * instead of printk().
    159159 *
    160  * @param[in] context points to a user defined context.
     160 * @param[in] context Unused.
    161161 * @param[in] fmt is a printf()-style format string
    162162 *
     
    164164 */
    165165extern int rtems_printf_plugin(void *context, const char *fmt, va_list ap);
     166
     167/**
     168 * @brief Reporting Methods fprintf() Plugin
     169 *
     170 * This is a standard plug-in to support using fprintf() for output
     171 * instead of printk().
     172 *
     173 * @param[in] context The file stream.
     174 * @param[in] fmt is a printf()-style format string
     175 *
     176 * @return The number of characters printed.
     177 */
     178extern int rtems_fprintf_plugin(void *context, const char *fmt, va_list ap);
    166179
    167180/**@}*/
  • cpukit/libcsupport/src/print_fprintf.c

    ra9cff51b r3242614  
    2323#include <stdio.h>
    2424
     25int rtems_fprintf_plugin(void *context, const char *fmt, va_list ap)
     26{
     27  return vfprintf(context, fmt, ap);
     28}
     29
    2530void rtems_print_printer_fprintf(rtems_printer *printer, FILE *file)
    2631{
    2732  printer->context = file;
    28   printer->printer = (rtems_print_plugin_t) fprintf;
     33  printer->printer = rtems_fprintf_plugin;
    2934}
Note: See TracChangeset for help on using the changeset viewer.