summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-05-08 21:09:05 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-05-09 08:39:49 +0800
commit263e31240d97484619f55630f625257dc874c5d0 (patch)
tree37ae4718b7db726697fc9e38c84582889cae03b9 /discover/device-handler.c
parentdc77d447920c6af88009ceea8b23a2172701d32b (diff)
downloadtalos-petitboot-263e31240d97484619f55630f625257dc874c5d0.tar.gz
talos-petitboot-263e31240d97484619f55630f625257dc874c5d0.zip
discover: handle boot_option->device_id entirely within handler
No need for parsers to populate (or forget to populate, in the case of most parsers) opt->device_id, as we should do it on finalise. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r--discover/device-handler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 0fc6d75..43171eb 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -75,6 +75,7 @@ static void boot_option_finalise(struct discover_boot_option *opt)
assert(!opt->option->boot_image_file);
assert(!opt->option->initrd_file);
assert(!opt->option->icon_file);
+ assert(!opt->option->device_id);
if (opt->boot_image)
opt->option->boot_image_file = opt->boot_image->url->full;
@@ -82,6 +83,8 @@ static void boot_option_finalise(struct discover_boot_option *opt)
opt->option->initrd_file = opt->initrd->url->full;
if (opt->icon)
opt->option->icon_file = opt->icon->url->full;
+
+ opt->option->device_id = opt->device->device->id;
}
static void process_boot_option_queue(struct device_handler *handler)
OpenPOWER on IntegriCloud