aboutsummaryrefslogtreecommitdiffstats
path: root/abort.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-01-25 17:03:53 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-01-25 17:03:53 -0800
commit1b0be9ec81fcddeec48e6e3ce3cbacab1f93ea29 (patch)
treed1415b8d188945802d15d5836df4a9b9dce63dc3 /abort.inc
parent5ed6636a950d39bc2fec9b3485f229eb7f0852e1 (diff)
downloadsyslinux-elf-1b0be9ec81fcddeec48e6e3ce3cbacab1f93ea29.tar.gz
syslinux-elf-1b0be9ec81fcddeec48e6e3ce3cbacab1f93ea29.tar.xz
syslinux-elf-1b0be9ec81fcddeec48e6e3ce3cbacab1f93ea29.zip
Invoke ONERROR if we hit abort_load (and ONERROR is set.)
Diffstat (limited to 'abort.inc')
-rw-r--r--abort.inc20
1 files changed, 16 insertions, 4 deletions
diff --git a/abort.inc b/abort.inc
index 80d70ad6..e6bf0d52 100644
--- a/abort.inc
+++ b/abort.inc
@@ -1,6 +1,6 @@
; -----------------------------------------------------------------------
;
-; Copyright 2005-2006 H. Peter Anvin - All Rights Reserved
+; Copyright 2005-2007 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
@@ -33,8 +33,8 @@ abort_check:
.ret1: ret
.kill: mov si,aborted_msg
-
- ; ... fall through ...
+ mov bx,enter_command
+ jmp abort_load_chain
;
; abort_load: Called by various routines which wants to print a fatal
@@ -44,10 +44,22 @@ abort_check:
; and the stack forcibly.
;
; SI = offset (in _text) of error message to print
+; BX = future entry point (abort_load_chain)
;
abort_load:
+ mov bx,error_or_command
+abort_load_chain:
RESET_STACK_AND_SEGS AX
call cwritestr ; Expects SI -> error msg
; Return to the command prompt
- jmp enter_command
+ jmp bx
+
+;
+; error_or_command: Execute ONERROR if appropriate, otherwise enter_command
+;
+error_or_command:
+ mov cx,[OnerrorLen]
+ and cx,cx
+ jnz on_error
+ jmp enter_command \ No newline at end of file