summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-12-23 03:56:12 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2017-12-23 03:56:12 +0100
commit50bea0348ce8f8af3ad506affe256d22e4ffdeab (patch)
treef70e8a1e31f822eec9b3228978be27067bd27ca4 /sys/src
parent19419329b29cd001b1db00e67b2971ab3061bdf1 (diff)
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.
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/9/pc/cga.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/src/9/pc/cga.c b/sys/src/9/pc/cga.c
index 528db05f4..824cd62eb 100644
--- a/sys/src/9/pc/cga.c
+++ b/sys/src/9/pc/cga.c
@@ -199,6 +199,8 @@ cgatokmesg(void)
void
screeninit(void)
{
+ static int once;
+
cgapos = cgaregr(0x0E)<<8;
cgapos |= cgaregr(0x0F);
cgapos *= 2;
@@ -208,8 +210,10 @@ screeninit(void)
movecursor();
}
- cgatokmesg();
+ if(once == 0){
+ once = 1;
+ cgatokmesg();
+ }
screenputs = cgascreenputs;
}
-