From fc359284bf5ac5b1992810911ea1c1721c832119 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 28 Feb 2008 15:15:31 +0000 Subject: space-pad top line with spaces to the right (like help message) --- mdk-stage1/newt-frontend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mdk-stage1/newt-frontend.c') diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c index 9c4fc1526..4520c9a7e 100644 --- a/mdk-stage1/newt-frontend.c +++ b/mdk-stage1/newt-frontend.c @@ -46,7 +46,9 @@ void init_frontend(char * welcome_msg) if (welcome_msg[0]) { char *msg; - asprintf(&msg, " %s", welcome_msg); + int cols, rows; + newtGetScreenSize(&cols, &rows); + asprintf(&msg, " %-*s", cols - 1, welcome_msg); newtDrawRootText(0, 0, msg); free(msg); newtPushHelpLine(" for here, to see the logs, for kernel msg"); -- cgit v1.2.1