Changeset 91327bd in rtems-libbsd


Ignore:
Timestamp:
Oct 10, 2018, 10:12:08 AM (7 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
647dd08ae2aa69b935c2847ea450fb824322ecae, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
175c1f8
Parents:
f949b43
git-author:
Sebastian Huber <sebastian.huber@…> (10/10/18 10:12:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/10/18 12:20:42)
Message:

Use global stdout for kernel output and syslog()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/rtems/rtems-kernel-vprintf.c

    rf949b43 r91327bd  
    4242#include <sys/types.h>
    4343#include <sys/lock.h>
     44#include <sys/reent.h>
    4445#include <sys/systm.h>
    4546#include <sys/syslog.h>
     
    6768
    6869static void
    69 vprintf_putchar(int c, void *arg)
     70default_putchar(int c)
     71{
     72
     73        /*
     74         * Output to the global stdout FILE object and not to the thread-local
     75         * stdout FILE object.
     76         */
     77        fputc(c, &__sf[1]);
     78}
     79
     80static void
     81kvprintf_putchar(int c, void *arg)
    7082{
    7183        int *last;
     
    7385        last = arg;
    7486        *last = c;
    75         putchar(c);
     87        default_putchar(c);
    7688}
    7789
     
    90102
    91103                while (*p != '\0') {
    92                         putchar(*p);
     104                        default_putchar(*p);
    93105                        ++p;
    94106                }
    95107
    96                 putchar(':');
    97                 putchar(' ');
     108                default_putchar(':');
     109                default_putchar(' ');
    98110        }
    99111
    100112        last = -1;
    101         n = kvprintf(fmt, vprintf_putchar, &last, 10, ap);
     113        n = kvprintf(fmt, kvprintf_putchar, &last, 10, ap);
    102114
    103115        if (level != LOG_PRINTF && last != '\n') {
    104                 putchar('\n');
     116                default_putchar('\n');
    105117        }
    106118
Note: See TracChangeset for help on using the changeset viewer.