X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=discover%2Fdevice-handler.c;h=43171eb7e1d7f0e2f6ec95392d364597dfa8c1cf;hb=59feea2ff244026cc63a49e038868fffe8286dad;hp=b2922b790560fd5089b5fda3a6f15ddcb9c12e73;hpb=b155a07583e33d51313b5747b961f5075e7465b2;p=petitboot diff --git a/discover/device-handler.c b/discover/device-handler.c index b2922b7..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) @@ -156,6 +159,9 @@ static void context_commit(struct device_handler *handler, opt->source->name, opt->option->id); talloc_free(opt); } else { + pb_log("boot option %s is unresolved, " + "adding to queue\n", + opt->option->id); list_add(&handler->unresolved_boot_options, &opt->list); talloc_steal(handler, opt); @@ -168,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); }