X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/8e6328ba94e7dadaef31a6186ba6d4437e1f06b3..4033103109721ab7a85c743c5c9d1c8f29a734ef:/aseg-paging/vga-overlay.c diff --git a/aseg-paging/vga-overlay.c b/aseg-paging/vga-overlay.c index 4d19c3b..2fe4dc6 100644 --- a/aseg-paging/vga-overlay.c +++ b/aseg-paging/vga-overlay.c @@ -4,6 +4,7 @@ #include #include #include +#include #define LOGLEN 96 #define LOG_ONSCREEN 4 @@ -86,6 +87,10 @@ void dolog(const char *s) { strcpy(logents[prodptr], s); prodptr = (prodptr + 1) % LOGLEN; + while (*s) + serial_tx(*(s++)); + serial_tx('\r'); + serial_tx('\n'); if (flush_imm) outlog(); } @@ -93,6 +98,20 @@ void (*output)(const char *s) = dolog; void dologf(const char *fmt, ...) { + char *s; + va_list va; + + va_start(va, fmt); + vsnprintf(logents[prodptr], 40, fmt, va); + s = logents[prodptr]; + while (*s) + serial_tx(*(s++)); + serial_tx('\r'); + serial_tx('\n'); + va_end(va); + prodptr = (prodptr + 1) % LOGLEN; + if (flush_imm) + outlog(); } void (*outputf)(const char *s, ...) = dologf;