Do not copy VESA state buffer if the VBE call has failed for any reason.
Do not unnecessarily clear the state buffer before calling the function.
This commit is contained in:
parent
452f890f26
commit
1a4c884636
@ -542,6 +542,7 @@ vesa_bios_save_restore(int code, void *p)
|
||||
switch (code) {
|
||||
case STATE_SAVE:
|
||||
x86bios_intr(®s, 0x10);
|
||||
if (regs.R_AX == 0x004f)
|
||||
bcopy(vesa_state_buf, p, vesa_state_buf_size);
|
||||
break;
|
||||
case STATE_LOAD:
|
||||
@ -1481,7 +1482,6 @@ vesa_save_state(video_adapter_t *adp, void *p, size_t size)
|
||||
} else
|
||||
vesa_vmem_buf = NULL;
|
||||
((adp_state_t *)p)->sig = V_STATE_SIG;
|
||||
bzero(((adp_state_t *)p)->regs, vesa_state_buf_size);
|
||||
return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user