diff options
Diffstat (limited to 'sys/os/os_trace.c')
| -rw-r--r-- | sys/os/os_trace.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/os/os_trace.c b/sys/os/os_trace.c index f8c989d..dd14cae 100644 --- a/sys/os/os_trace.c +++ b/sys/os/os_trace.c @@ -27,15 +27,29 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <sys/types.h> #include <os/trace.h> +#include <dev/cons/cons.h> #include <kern/serial.h> #include <lib/stdarg.h> #include <lib/string.h> +extern struct console g_bootcons; + static void trace_write(const char *s) { - serial_write(s, strlen(s)); + size_t len; + + if (s == NULL) { + return; + } + + len = strlen(s); + serial_write(s, len); + if (g_bootcons.active) { + console_write(&g_bootcons, s, len); + } } void |
