X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fdevice-handler.c;h=43171eb7e1d7f0e2f6ec95392d364597dfa8c1cf;hp=9e4c5bb228ebb285b9a905198e69f930e862d8e4;hb=263e31240d97484619f55630f625257dc874c5d0;hpb=9af0c65fa5ba9ae8527a70dbf0e808d777dfb479 diff --git a/discover/device-handler.c b/discover/device-handler.c index 9e4c5bb..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) @@ -171,7 +174,7 @@ void discover_context_add_boot_option(struct discover_context *ctx, struct discover_boot_option *boot_option) { boot_option->source = ctx->parser; - list_add(&ctx->boot_options, &boot_option->list); + list_add_tail(&ctx->boot_options, &boot_option->list); talloc_steal(ctx, boot_option); }