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.
This commit is contained in:
cinap_lenrek 2017-12-23 03:56:12 +01:00
parent 19419329b2
commit 50bea0348c

View file

@ -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;
}