projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
390ec0f
)
ldlinux: Fix OnError behaviour
author
Matt Fleming
<matt.fleming@intel.com>
Mon, 26 Nov 2012 13:13:07 +0000
(13:13 +0000)
committer
Matt Fleming
<matt.fleming@intel.com>
Mon, 26 Nov 2012 13:21:34 +0000
(13:21 +0000)
If the ONERROR directive references a label we need to lookup the
label's command line and type.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/ldlinux.c
patch
|
blob
|
history
diff --git
a/com32/elflink/ldlinux/ldlinux.c
b/com32/elflink/ldlinux/ldlinux.c
index
d3f8e62
..
4a09283
100644
(file)
--- a/
com32/elflink/ldlinux/ldlinux.c
+++ b/
com32/elflink/ldlinux/ldlinux.c
@@
-201,8
+201,14
@@
bad_kernel:
* line.
*/
if (onerrorlen) {
- rsprintf(&cmdline, "%s %s", onerror, default_cmd);
- execute(cmdline, IMAGE_TYPE_COM32);
+ me = find_label(onerror);
+ if (me)
+ rsprintf(&cmdline, "%s %s", me->cmdline, default_cmd);
+ else
+ rsprintf(&cmdline, "%s %s", onerror, default_cmd);
+
+ type = parse_image_type(cmdline);
+ execute(cmdline, type);
}
}