diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-10-10 16:01:42 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-10-10 16:08:54 +0800 |
commit | 769fd76dc9bf3440999297ab943af49160df9c45 (patch) | |
tree | 0a7bf642f9bc026e1978ac8e38a6b36ae6863672 /discover/device-handler.c | |
parent | b16b116422f1fb817924f4d2c3d9b1354da35614 (diff) | |
download | talos-petitboot-769fd76dc9bf3440999297ab943af49160df9c45.tar.gz talos-petitboot-769fd76dc9bf3440999297ab943af49160df9c45.zip |
discover: Allow device_handler_boot with no option
Only call find_boot_option_by_id if we have an ID.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r-- | discover/device-handler.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c index 94abb51..142f6a4 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -650,9 +650,10 @@ static struct discover_boot_option *find_boot_option_by_id( void device_handler_boot(struct device_handler *handler, struct boot_command *cmd) { - struct discover_boot_option *opt; + struct discover_boot_option *opt = NULL; - opt = find_boot_option_by_id(handler, cmd->option_id); + if (cmd->option_id && strlen(cmd->option_id)) + opt = find_boot_option_by_id(handler, cmd->option_id); boot(handler, opt, cmd, handler->dry_run, boot_status, handler); } |