ldlinux: Parse kernel type for labels
authorMatt Fleming <matt.fleming@intel.com>
Thu, 9 Feb 2012 10:15:38 +0000 (10:15 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 13 Mar 2012 10:22:03 +0000 (10:22 +0000)
commitb0a737c5cdbd7de3790bc5cf9a0e4b21dd1aed56
tree676ec634dea3f51df211d98921196ea73b4b6d31
parentc8224383b59b1887c020182684d23a134470802a
ldlinux: Parse kernel type for labels

We need to parse the kernel type for labels aswell as things entered
on the cmdline, instead of always passing KT_KERNEL or KT_NONE to
execute(). Move the logic into a new helper function.

This fixes a bug where an incorrect kernel type would be passed to
execute() if anything other than a linux kernel (such as a .bin) was
specified in a LABEL's KERNEL argument, which resulted in the file not
being executed.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/ldlinux.c