mirror of
https://github.com/ipxe/ipxe
synced 2025-12-13 15:31:42 +03:00
Set CF by default, clear on success (rather than clearing and setting
on failure).
This commit is contained in:
@@ -409,9 +409,10 @@ static void int13 ( struct i386_all_regs *ix86 ) {
|
|||||||
|
|
||||||
/* Negative status indicates an error */
|
/* Negative status indicates an error */
|
||||||
if ( status < 0 ) {
|
if ( status < 0 ) {
|
||||||
ix86->flags |= CF;
|
|
||||||
status = -status;
|
status = -status;
|
||||||
DBG ( "INT13 failed with status %x\n", status );
|
DBG ( "INT13 failed with status %x\n", status );
|
||||||
|
} else {
|
||||||
|
ix86->flags &= ~CF;
|
||||||
}
|
}
|
||||||
ix86->regs.ah = status;
|
ix86->regs.ah = status;
|
||||||
|
|
||||||
@@ -433,7 +434,8 @@ static void hook_int13 ( void ) {
|
|||||||
*/
|
*/
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
TEXT16_CODE ( "\nint13_wrapper:\n\t"
|
TEXT16_CODE ( "\nint13_wrapper:\n\t"
|
||||||
"orb $0, %%al\n\t" /* clear CF and OF */
|
"orb $0, %%al\n\t" /* clear OF */
|
||||||
|
"stc\n\t"
|
||||||
"pushl %0\n\t" /* call int13() */
|
"pushl %0\n\t" /* call int13() */
|
||||||
"pushw %%cs\n\t"
|
"pushw %%cs\n\t"
|
||||||
"call prot_call\n\t"
|
"call prot_call\n\t"
|
||||||
|
|||||||
Reference in New Issue
Block a user