X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/bf47740a3f21a15c662193917bd86cd310af7638..98d29191ab62caf43c16b3d792996ea51bec067d:/aseg-paging/vga-overlay.c?ds=sidebyside diff --git a/aseg-paging/vga-overlay.c b/aseg-paging/vga-overlay.c index 7b33a7b..2fe4dc6 100644 --- a/aseg-paging/vga-overlay.c +++ b/aseg-paging/vga-overlay.c @@ -88,7 +88,9 @@ void dolog(const char *s) strcpy(logents[prodptr], s); prodptr = (prodptr + 1) % LOGLEN; while (*s) - serial_tx(*s); + serial_tx(*(s++)); + serial_tx('\r'); + serial_tx('\n'); if (flush_imm) outlog(); } @@ -96,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;