2 * (C) Copyright 2007-2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
10 #include <directory.h>
19 int con_vprintf(struct virt_cons
*con
, const char *fmt
, va_list args
)
21 struct virt_sys
*sys
= container_of(con
, struct virt_sys
, console
);
28 memset(&dt
, 0, sizeof(dt
));
29 ret
= get_parsed_tod(&dt
);
30 ret
= snprintf(buf
, sizeof(buf
), "%02d:%02d:%02d ", dt
.th
, dt
.tm
,
35 if (sys
->print_name
) {
36 ret
= snprintf(buf
+ off
, sizeof(buf
) - off
, "%s ",
37 sys
->directory
->userid
);
41 ret
= vsnprintf(buf
+ off
, sizeof(buf
) - off
, fmt
, args
);
44 /* internal guests direct all console traffic to sclp */
47 /* normal guests direct it to their console device */
48 ascii2ebcdic((u8
*) buf
, off
+ret
);
49 //con_write(con, (u8 *) buf, off+ret);
56 int con_printf(struct virt_cons
*con
, const char *fmt
, ...)
62 r
= con_vprintf(con
, fmt
, args
);