diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-04-04 15:55:27 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-04-04 15:55:27 +1000 |
commit | 08447507ebe7a7aafdf95c734dd30ec89b1c79f8 (patch) | |
tree | 3af66ca1e7b891916137f8ada59a4fdc94c42dea | |
parent | 51fa27b3bfe5f11067e2b301c42451c2838575a8 (diff) | |
download | talos-petitboot-08447507ebe7a7aafdf95c734dd30ec89b1c79f8.tar.gz talos-petitboot-08447507ebe7a7aafdf95c734dd30ec89b1c79f8.zip |
More message bits
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | petitboot.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/petitboot.c b/petitboot.c index 478b294..b443280 100644 --- a/petitboot.c +++ b/petitboot.c @@ -827,6 +827,18 @@ static void pboot_spane_draw(twin_window_t *window) twin_path_destroy(path); } +void pboot_message(const char *message) +{ + if (pboot_spane->text) + free(pboot_spane->text); + pboot_spane->text = strdup(message); + twin_window_damage(pboot_spane->window, + 0, 0, + pboot_spane->window->pixmap->width, + pboot_spane->window->pixmap->height); + twin_window_queue_paint(pboot_spane->window); +} + static void pboot_create_spane(void) { pboot_spane = calloc(1, sizeof(pboot_spane_t)); @@ -846,7 +858,7 @@ static void pboot_create_spane(void) pboot_spane->window->draw = pboot_spane_draw; pboot_spane->window->client_data = pboot_spane; - pboot_spane->text = PBOOT_INITIAL_MESSAGE; + pboot_spane->text = strdup(PBOOT_INITIAL_MESSAGE); twin_window_show(pboot_spane->window); twin_window_queue_paint(pboot_spane->window); } |