- list_for_each_entry(&dev->boot_options, opt, list) {
- struct pmenu_item *i;
- struct cui_opt_data *cod;
- char *name;
-
- /* Save the item in opt->ui_info for cui_device_remove() */
-
- opt->ui_info = i = pmenu_item_alloc(cui->main);
-
- i->on_edit = cui_boot_editor_run;
- i->on_execute = cui_run_kexec;
- i->data = cod = talloc(i, struct cui_opt_data);
-
- cod->dev = dev;
- cod->opt = opt;
- cod->opt_hash = pb_opt_hash(dev, opt);
- cod->name = opt->name;
- cod->kd = talloc(i, struct pb_kexec_data);
-
- cod->kd->image = talloc_strdup(cod->kd, opt->boot_image_file);
- cod->kd->initrd = talloc_strdup(cod->kd, opt->initrd_file);
- cod->kd->args = talloc_strdup(cod->kd, opt->boot_args);
-
- name = cui_make_item_name(i, cod);
- pmenu_item_setup(cui->main, i, insert_pt, name);
-
- insert_pt++;
-
- pb_log("%s: adding opt '%s'\n", __func__, cod->name);
- pb_log(" image '%s'\n", cod->kd->image);
- pb_log(" initrd '%s'\n", cod->kd->initrd);
- pb_log(" args '%s'\n", cod->kd->args);
-
- /* If this is the default_item select it and start timer. */