projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b16b116
)
discover: Allow device_handler_boot with no option
author
Jeremy Kerr
<jk@ozlabs.org>
Thu, 10 Oct 2013 08:01:42 +0000
(16:01 +0800)
committer
Jeremy Kerr
<jk@ozlabs.org>
Thu, 10 Oct 2013 08:08:54 +0000
(16:08 +0800)
Only call find_boot_option_by_id if we have an ID.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/device-handler.c
patch
|
blob
|
history
diff --git
a/discover/device-handler.c
b/discover/device-handler.c
index 94abb514ab02f4ecd7c6f53aca81a94f7b8afb2f..142f6a490028508056415ab99e78f020f035b309 100644
(file)
--- 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);
}