X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fparser-utils.c;h=47e30d8055040cb28b9b876ff7d88ffa4cb45ac6;hp=4982112f403abcd142dd7ffe0d4e2cc6870811e0;hb=192291bf0e5ae7ad714c863926ed0b8981102e9c;hpb=ce5eab024583af5a4725503bad6ed2aee452b1aa diff --git a/discover/parser-utils.c b/discover/parser-utils.c index 4982112..47e30d8 100644 --- a/discover/parser-utils.c +++ b/discover/parser-utils.c @@ -1,9 +1,11 @@ #include +#include #include #include "pb-protocol/pb-protocol.h" +#include "event.h" #include "udev.h" #include "device-handler.h" #include "parser-utils.h" @@ -11,6 +13,14 @@ void device_add_boot_option(struct device *device, struct boot_option *boot_option) { + pb_log("%s: %s\n", __func__, device->id); + pb_log(" id '%s'\n", boot_option->id); + pb_log(" name '%s'\n", boot_option->name); + pb_log(" descr '%s'\n", boot_option->description); + pb_log(" icon '%s'\n", boot_option->icon_file); + pb_log(" image '%s'\n", boot_option->boot_image_file); + pb_log(" initrd '%s'\n", boot_option->initrd_file); + pb_log(" args '%s'\n", boot_option->boot_args); list_add(&device->boot_options, &boot_option->list); talloc_steal(device, boot_option); } @@ -33,13 +43,13 @@ const char *generic_icon_file(enum generic_icon_type type) enum generic_icon_type guess_device_type(struct discover_context *ctx) { - struct udev_event *event; + struct event *event; const char *type, *bus; event = ctx->event; - type = udev_event_param(event, "ID_TYPE"); - bus = udev_event_param(event, "ID_BUS"); + type = event_get_param(event, "ID_TYPE"); + bus = event_get_param(event, "ID_BUS"); if (type && streq(type, "cd")) return ICON_TYPE_OPTICAL;