]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/dde/ddekit/src/printf.c
Some minor fixes.
[l4.git] / l4 / pkg / dde / ddekit / src / printf.c
1 /*
2  * \brief   Logging facility with printf()-like interface
3  */
4
5 /*
6  * This file is part of DDEKit.
7  *
8  * (c) 2006-2012 Bjoern Doebel <doebel@os.inf.tu-dresden.de>
9  *               Christian Helmuth <ch12@os.inf.tu-dresden.de>
10  *               Thomas Friebel <tf13@os.inf.tu-dresden.de>
11  *     economic rights: Technische Universitaet Dresden (Germany)
12  *
13  * This file is part of TUD:OS and distributed under the terms of the
14  * GNU General Public License 2.
15  * Please see the COPYING-GPL-2 file for details.
16  */
17
18 #include <l4/dde/ddekit/printf.h>
19
20 #include <stdio.h>
21
22 /**
23  * Log constant string message w/o arguments
24  *
25  * \param msg  message to be logged
26  */
27 void ddekit_print(const char *msg)
28 {
29         printf("%s", msg);
30 }
31
32 /**
33  * Log message with print()-like arguments
34  *
35  * \param fmt  format string followed by optional arguments
36  */
37 void ddekit_printf(const char *fmt, ...)
38 {
39         va_list va;
40
41         va_start(va, fmt);
42         ddekit_vprintf(fmt, va);
43         va_end(va);
44 }
45
46 /* Log message with vprintf()-like arguments
47  *
48  * \param fmt  format string
49  * \param va   variable argument list
50  */
51 void ddekit_vprintf(const char *fmt, va_list va)
52 {
53         vprintf(fmt, va);
54 }