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:
parent
19419329b2
commit
50bea0348c
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue