}
/**
- * pb_run_kexec - Run kexec with the supplied boot options.
+ * pb_boot - Run kexec with the supplied boot options.
*/
-int pb_run_kexec(const struct pb_boot_data *bd, int dry_run)
+int pb_boot(const struct pb_boot_data *bd, int dry_run)
{
int result;
char *l_image = NULL;
char *args;
};
-int pb_run_kexec(const struct pb_boot_data *bd, int dry_run);
+int pb_boot(const struct pb_boot_data *bd, int dry_run);
int pb_start_daemon(void);
unsigned int pb_elf_hash(const char *str);
}
/**
- * pb_kexec_cb - The kexec callback.
+ * pb_boot_cb - The kexec callback.
*/
-static int pb_kexec_cb(struct cui *cui, struct cui_opt_data *cod)
+static int pb_boot_cb(struct cui *cui, struct cui_opt_data *cod)
{
struct pb_cui *pb = pb_from_cui(cui);
assert(pb->cui->current == &pb->cui->main->scr);
- return pb_run_kexec(cod->bd, pb->cui->dry_run);
+ return pb_boot(cod->bd, pb->cui->dry_run);
}
/**
return EXIT_FAILURE;
}
- pb.cui = cui_init(&pb, pb_kexec_cb, NULL, opts.start_daemon,
+ pb.cui = cui_init(&pb, pb_boot_cb, NULL, opts.start_daemon,
opts.dry_run);
if (!pb.cui)
}
/**
- * cui_run_kexec - A generic cb to run kexec.
+ * cui_boot - A generic cb to run kexec.
*/
-static int cui_run_kexec(struct pmenu_item *item)
+static int cui_boot(struct pmenu_item *item)
{
int result;
struct cui *cui = cui_from_item(item);
struct cui_opt_data *cod = cod_from_item(item);
assert(cui->current == &cui->main->scr);
- assert(cui->on_kexec);
+ assert(cui->on_boot);
pb_log("%s: %s\n", __func__, cod->name);
nc_scr_status_printf(cui->current, "Booting %s...", cod->name);
def_prog_mode();
- result = cui->on_kexec(cui, cod);
+ result = cui->on_boot(cui, cod);
reset_prog_mode();
redrawwin(cui->current->main_ncw);
i = pmenu_item_alloc(menu);
i->on_edit = cui_boot_editor_run;
- i->on_execute = cui_run_kexec;
+ i->on_execute = cui_boot;
i->data = cod = talloc_zero(i, struct cui_opt_data);
cod->name = talloc_asprintf(i, "User item %u:", insert_pt);
opt->ui_info = i = pmenu_item_alloc(cui->main);
i->on_edit = cui_boot_editor_run;
- i->on_execute = cui_run_kexec;
+ i->on_execute = cui_boot;
i->data = cod = talloc(i, struct cui_opt_data);
cod->dev = dev;
*/
struct cui *cui_init(void* platform_info,
- int (*on_kexec)(struct cui *, struct cui_opt_data *),
+ int (*on_boot)(struct cui *, struct cui_opt_data *),
int (*js_map)(const struct js_event *e), int start_deamon, int dry_run)
{
struct cui *cui;
cui->c_sig = pb_cui_sig;
cui->platform_info = platform_info;
- cui->on_kexec = on_kexec;
+ cui->on_boot = on_boot;
cui->timer.handle_timeout = cui_handle_timeout;
cui->dry_run = dry_run;
cui->waitset = waitset_create(cui);
struct pjs *pjs;
void *platform_info;
unsigned int default_item;
- int (*on_kexec)(struct cui *cui, struct cui_opt_data *cod);
+ int (*on_boot)(struct cui *cui, struct cui_opt_data *cod);
};
struct cui *cui_init(void* platform_info,
- int (*on_kexec)(struct cui *, struct cui_opt_data *),
+ int (*on_boot)(struct cui *, struct cui_opt_data *),
int (*js_map)(const struct js_event *e), int start_deamon, int dry_run);
struct nc_scr *cui_set_current(struct cui *cui, struct nc_scr *scr);
int cui_run(struct cui *cui, struct pmenu *main, unsigned int default_item);
}
/**
- * ps3_kexec_cb - The kexec callback.
+ * ps3_boot_cb - The kexec callback.
*
- * Writes config data to PS3 flash then calls pb_run_kexec().
+ * Writes config data to PS3 flash then calls pb_boot().
* Adds a video mode arg to the kernel command line if needed.
*/
-static int ps3_kexec_cb(struct cui *cui, struct cui_opt_data *cod)
+static int ps3_boot_cb(struct cui *cui, struct cui_opt_data *cod)
{
struct ps3_cui *ps3 = ps3_from_cui(cui);
int result;
} else
altered_args = 0;
- result = pb_run_kexec(cod->bd, ps3->cui->dry_run);
+ result = pb_boot(cod->bd, ps3->cui->dry_run);
if (altered_args) {
talloc_free(cod->bd->args);
if (!result && (ps3.values.video_mode != (uint16_t)mode))
ps3_set_video_mode(ps3.values.video_mode);
- ps3.cui = cui_init(&ps3, ps3_kexec_cb, ps3_sixaxis_map);
+ ps3.cui = cui_init(&ps3, ps3_boot_cb, ps3_sixaxis_map);
if (!ps3.cui)
return EXIT_FAILURE;
return NULL;
}
-static int kexec_cb(struct pbt_client *client, struct pb_opt_data *opt_data)
+static int boot_cb(struct pbt_client *client, struct pb_opt_data *opt_data)
{
int result;
pb_log("%s: %s\n", __func__, opt_data->name);
- result = pb_run_kexec(opt_data->bd, client->dry_run);
+ result = pb_boot(opt_data->bd, client->dry_run);
return result;
}
return EXIT_FAILURE;
}
- client = pbt_client_init(opts.backend, 1024, 640, kexec_cb,
+ client = pbt_client_init(opts.backend, 1024, 640, boot_cb,
opts.start_daemon, opts.dry_run);
if (!client) {
va_end(ap);
}
-static int pbt_client_run_kexec(struct pbt_item *item)
+static int pbt_client_boot(struct pbt_item *item)
{
int result;
struct pb_opt_data *opt_data = pbt_opt_data_from_item(item);
pbt_frame_status_printf(&item->pbt_client->frame, "Booting %s...",
pbt_item_name(item));
- assert(item->pbt_client->kexec_cb);
- result = item->pbt_client->kexec_cb(item->pbt_client, opt_data);
+ assert(item->pbt_client->boot_cb);
+ result = item->pbt_client->boot_cb(item->pbt_client, opt_data);
if (!result) {
sleep(item->pbt_client->dry_run ? 1 : 60);
i->pb_opt = opt;
i->pbt_client = client;
- i->on_execute = pbt_client_run_kexec;
+ i->on_execute = pbt_client_boot;
i->on_edit = pbt_client_on_edit;
i->data = opt_data = talloc(i, struct pb_opt_data);
struct pbt_client *pbt_client_init(enum pbt_twin_backend backend,
unsigned int width, unsigned int height,
- int (*kexec_cb)(struct pbt_client *, struct pb_opt_data *),
+ int (*boot_cb)(struct pbt_client *, struct pb_opt_data *),
int start_deamon, int dry_run)
{
struct pbt_client *pbt_client;
pbt_client->waitset = waitset_create(pbt_client);
pbt_client->sig = "pbt_client";
- pbt_client->kexec_cb = kexec_cb;
+ pbt_client->boot_cb = boot_cb;
pbt_client->dry_run = dry_run;
pbt_client->frame.scr = pbt_scr_init(pbt_client, pbt_client->waitset,
backend, width, height, NULL, NULL);
int dry_run;
struct pb_signal_data signal_data;
void *client_data;
- int (*kexec_cb)(struct pbt_client *pbt_client, struct pb_opt_data *pod);
+ int (*boot_cb)(struct pbt_client *pbt_client, struct pb_opt_data *pod);
struct pbt_frame frame;
struct discover_client *discover_client;
struct pbt_client *pbt_client_init(enum pbt_twin_backend backend,
unsigned int width, unsigned int height,
- int (*kexec_cb)(struct pbt_client *, struct pb_opt_data *),
+ int (*boot_cb)(struct pbt_client *, struct pb_opt_data *),
int start_deamon, int dry_run);
void pbt_client_destroy(struct pbt_client *client);
void pbt_client_resize(struct pbt_client *client);