* Understands params: name, image, args.
*/
-int parse_user_event(struct device *device, struct event *event)
+struct boot_option *parse_user_event(struct device *device, struct event *event)
{
struct boot_option *opt;
const char *p;
}
opt->id = talloc_asprintf(opt, "%s#%s", device->id, p);
+ opt->device_id = talloc_strdup(opt, device->id);
opt->name = talloc_strdup(opt, p);
p = event_get_param(event, "image");
device_add_boot_option(device, opt);
- return 0;
+ return opt;
fail:
talloc_free(opt);
- return -1;
+ return NULL;
}