Changeset 08c8588 in rtems-libbsd


Ignore:
Timestamp:
Jan 20, 2014, 11:50:23 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, b96abfd647154f10ea8f7fac68e25676636eded5, debc0aed8b9bef9996b8ec0ae7a70b0b41912e27, 0ad342ae5f65d22eb6c914d58664d3b5d1d3d43f, freebsd-9.3, 98d197895b6162050176ea18d66783a1dc216d82
Children:
c1bdbab
Parents:
164c5f5
git-author:
Sebastian Huber <sebastian.huber@…> (01/20/14 11:50:23)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/30/14 14:04:18)
Message:

PRINTF(9): Do not use printk() for log()

The BSD library functions must use printk(). The %D format specifier is
not supported, thus we cannot use the printf() family for output.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libbsd.txt

    r164c5f5 r08c8588  
    115115  destruction.  Add support for file descriptor transmission via control
    116116  messages.
     117
     118* PRINTF(9): Add support for log(), the %D format specifier is missing in the
     119  normal printf() family.
    117120
    118121[listing]
  • rtemsbsd/rtems/rtems-bsd-log.c

    r164c5f5 r08c8588  
    3838#include <sys/systm.h>
    3939
    40 /*
    41  * Log writes to the log buffer, and guarantees not to sleep (so can be
    42  * called by interrupt routines).  If there is no process reading the
    43  * log yet, it writes to the console also.
    44  */
     40#include <stdio.h>
     41
    4542void
    4643log(int level, const char *fmt, ...)
    4744{
    48         va_list ap;
    49 
    50         va_start(ap, fmt);
    51         vprintk(fmt, ap);
    52         va_end(ap);
     45        puts(fmt);
    5346}
Note: See TracChangeset for help on using the changeset viewer.