ref: 50bea0348ce8f8af3ad506affe256d22e4ffdeab
parent: 19419329b29cd001b1db00e67b2971ab3061bdf1
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Dec 22 22:56:12 EST 2017
kernel: convert textmode cga screen contents to kmesg only once screeninit() might be called again by devvga when switching to textmode, so only convert the text framebuffer to kmesg the first time.
--- a/sys/src/9/pc/cga.c
+++ b/sys/src/9/pc/cga.c
@@ -199,6 +199,8 @@
void
screeninit(void)
{
+ static int once;
+
cgapos = cgaregr(0x0E)<<8;
cgapos |= cgaregr(0x0F);
cgapos *= 2;
@@ -208,8 +210,10 @@
movecursor();
}
- cgatokmesg();
+ if(once == 0){
+ once = 1;
+ cgatokmesg();
+ }
screenputs = cgascreenputs;
}
-