Add a callback to handle and display boot status messages from the
discover server.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
reset_prog_mode();
redrawwin(cui->current->main_ncw);
reset_prog_mode();
redrawwin(cui->current->main_ncw);
- if (!result) {
- clear();
- mvaddstr(1, 0, "system is going down now...");
- refresh();
- } else {
nc_scr_status_printf(cui->current,
"Failed: boot %s", cod->bd->image);
}
nc_scr_status_printf(cui->current,
"Failed: boot %s", cod->bd->image);
}
cui->current->post(cui->current);
}
cui->current->post(cui->current);
}
+static void cui_update_status(struct boot_status *status, void *arg)
+{
+ struct cui *cui = cui_from_arg(arg);
+
+ nc_scr_status_printf(cui->current,
+ "%s: %s",
+ status->type == BOOT_STATUS_ERROR ? "Error" : "Info",
+ status->message);
+
+}
+
static struct discover_client_ops cui_client_ops = {
.device_add = NULL,
.boot_option_add = cui_boot_option_add,
.device_remove = cui_device_remove,
static struct discover_client_ops cui_client_ops = {
.device_add = NULL,
.boot_option_add = cui_boot_option_add,
.device_remove = cui_device_remove,
+ .update_status = cui_update_status,