From af20ba67460b79f7c4aee7014756205baba29cd5 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 26 Nov 2017 04:49:30 +0100 Subject: devvga: re-render text from kmesg after resize --- sys/src/9/pc/vga.c | 2 ++ sys/src/9/port/devcons.c | 10 ---------- sys/src/9/port/portdat.h | 10 ++++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/src/9/pc/vga.c b/sys/src/9/pc/vga.c index fe903f0a0..430ce89fc 100644 --- a/sys/src/9/pc/vga.c +++ b/sys/src/9/pc/vga.c @@ -217,6 +217,8 @@ vgascreenwin(VGAscr* scr) qunlock(&drawlock); + vgascreenputs(kmesg.buf, kmesg.n); + screenputs = vgascreenputs; } diff --git a/sys/src/9/port/devcons.c b/sys/src/9/port/devcons.c index 0d755bdc1..79698c408 100644 --- a/sys/src/9/port/devcons.c +++ b/sys/src/9/port/devcons.c @@ -63,16 +63,6 @@ prflush(void) break; } -/* - * Log console output so it can be retrieved via /dev/kmesg. - * This is good for catching boot-time messages after the fact. - */ -struct { - Lock lk; - char buf[16384]; - uint n; -} kmesg; - static void kmesgputs(char *str, int n) { diff --git a/sys/src/9/port/portdat.h b/sys/src/9/port/portdat.h index 9cb495128..059af4e60 100644 --- a/sys/src/9/port/portdat.h +++ b/sys/src/9/port/portdat.h @@ -991,3 +991,13 @@ enum #pragma varargck type "V" uchar* #pragma varargck type "E" uchar* #pragma varargck type "M" uchar* + +/* + * Log console output so it can be retrieved via /dev/kmesg. + * This is good for catching boot-time messages after the fact. + */ +struct { + Lock lk; + uint n; + char buf[16384]; +} kmesg; -- cgit v1.2.3