blob: a93cd46cc1b1f9e899b207d9f4bdcadfac14b727 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/**
* @file
*
* @ingroup RTEMSAPIKernelCharIO
*
* @brief This source file contains the implementation of printk().
*/
/*
* (C) Copyright 1997 -
* - NavIST Group - Real-Time Distributed Systems and Industrial Automation
*
* http://pandora.ist.utl.pt
*
* Instituto Superior Tecnico * Lisboa * PORTUGAL
*
* Disclaimer:
*
* This file is provided "AS IS" without warranty of any kind, either
* expressed or implied.
*
* This code is based on code by: Jose Rufino - IST
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdarg.h>
#include <stdio.h>
#include <rtems/bspIo.h>
/**
* Kernel printf function requiring minimal infrastructure.
*/
int printk(const char *fmt, ...)
{
va_list ap; /* points to each unnamed argument in turn */
int len;
va_start(ap, fmt); /* make ap point to 1st unnamed arg */
len = vprintk(fmt, ap);
va_end(ap); /* clean up when done */
return len;
}
|