summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/interface/pcbios/int13.c
diff options
context:
space:
mode:
authorMichael Brown2007-07-09 20:02:41 +0200
committerMichael Brown2007-07-09 20:02:41 +0200
commit8bce52d348c5fd740d00ccb826baf0f341e9885e (patch)
tree47e087a27a474aebc4c2067b6ce67c6575516849 /src/arch/i386/interface/pcbios/int13.c
parentRemove xfer_ready() (it has been replaced by xfer_window()) (diff)
downloadipxe-8bce52d348c5fd740d00ccb826baf0f341e9885e.tar.gz
ipxe-8bce52d348c5fd740d00ccb826baf0f341e9885e.tar.xz
ipxe-8bce52d348c5fd740d00ccb826baf0f341e9885e.zip
Set CF by default, clear on success (rather than clearing and setting
on failure).
Diffstat (limited to 'src/arch/i386/interface/pcbios/int13.c')
-rw-r--r--src/arch/i386/interface/pcbios/int13.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/i386/interface/pcbios/int13.c b/src/arch/i386/interface/pcbios/int13.c
index b97d066c..aeb66ade 100644
--- a/src/arch/i386/interface/pcbios/int13.c
+++ b/src/arch/i386/interface/pcbios/int13.c
@@ -409,9 +409,10 @@ static void int13 ( struct i386_all_regs *ix86 ) {
/* Negative status indicates an error */
if ( status < 0 ) {
- ix86->flags |= CF;
status = -status;
DBG ( "INT13 failed with status %x\n", status );
+ } else {
+ ix86->flags &= ~CF;
}
ix86->regs.ah = status;
@@ -433,7 +434,8 @@ static void hook_int13 ( void ) {
*/
__asm__ __volatile__ (
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() */
"pushw %%cs\n\t"
"call prot_call\n\t"