ref: 3cd63fc81802431d9b7999794689ebcac56347a2
parent: c7155ef83958d86b856ae7b5469747040abbc7e4
	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;
}
-
--
⑨