1 /*
2 * Source file for kernel interface to kernel log facility
3 *
4 * Copyright (C) Eicon Technology Corporation, 2000.
5 *
6 * Eicon File Revision : 1.3
7 *
8 * This software may be used and distributed according to the terms
9 * of the GNU General Public License, incorporated herein by reference.
10 *
11 */
12
13 #include "eicon.h"
14 #include "sys.h"
15 #include <stdarg.h>
16
17 #include "divas.h"
18 #include "divalog.h"
19 #include "uxio.h"
20
DivasPrintf(char * fmt,...)21 void DivasPrintf(char *fmt, ...)
22
23 {
24 klog_t log; /* log entry buffer */
25
26 va_list argptr; /* pointer to additional args */
27
28 va_start(argptr, fmt);
29
30 /* clear log entry */
31
32 memset((void *) &log, 0, sizeof(klog_t));
33
34 log.card = -1;
35 log.type = KLOG_TEXT_MSG;
36
37 /* time stamp the entry */
38
39 log.time_stamp = UxTimeGet();
40
41 /* call vsprintf to format the user's information */
42
43 vsnprintf(log.buffer, DIM(log.buffer), fmt, argptr);
44
45 va_end(argptr);
46
47 /* send to the log streams driver and return */
48
49 DivasLogAdd(&log, sizeof(klog_t));
50
51 return;
52 }
53