From 331e0f0ad1bc563b1b2b2f22b08812f1047ed89e Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Mon, 18 May 2015 21:05:52 -0700 Subject: [PATCH] All debug lines to go straight to serial rather than TTY --- modules/debug_shell.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/debug_shell.c b/modules/debug_shell.c index 80680084..9718c85f 100644 --- a/modules/debug_shell.c +++ b/modules/debug_shell.c @@ -246,7 +246,12 @@ static int shell_log(fs_node_t * tty, int argc, char * argv[]) { fprintf(tty, "Serial logging is %s.\n", !!debug_file ? "enabled" : "disabled"); fprintf(tty, "Usage: log [on|off] []\n"); } else { - if (!strcmp(argv[1], "on")) { + if (!strcmp(argv[1], "direct")) { + debug_file = kopen("/dev/ttyS0", 0); + if (argc > 2) { + debug_level = atoi(argv[2]); + } + } else if (!strcmp(argv[1], "on")) { debug_file = tty; if (argc > 2) { debug_level = atoi(argv[2]);