summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/newt-frontend.c21
-rw-r--r--mdk-stage1/probing.c2
2 files changed, 14 insertions, 9 deletions
diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c
index 867a6d7f1..a822227a3 100644
--- a/mdk-stage1/newt-frontend.c
+++ b/mdk-stage1/newt-frontend.c
@@ -78,11 +78,12 @@ void info_message(char *msg, ...)
void wait_message(char *msg, ...)
{
- int width = 8;
- int height = 3;
+ int width, height;
char * title = "Please wait...";
newtComponent c, f;
+ newtGrid grid;
char * buf = NULL;
+ char * flowed;
int size = 0;
int i = 0;
va_list args;
@@ -94,19 +95,23 @@ void wait_message(char *msg, ...)
if (buf) free(buf);
buf = malloc(size);
i = vsnprintf(buf, size, msg, args);
- width += i;
- } while (i == size);
+ } while (i >= size || i == -1);
+
+ flowed = newtReflowText(buf, 60, 5, 5, &width, &height);
va_end(args);
- newtCenteredWindow(width, height, title);
+ c = newtTextbox(-1, -1, width, height, NEWT_TEXTBOX_WRAP);
+ newtTextboxSetText(c, flowed);
- c = newtTextbox(1, 1, width - 2, height - 2, NEWT_TEXTBOX_WRAP);
- newtTextboxSetText(c, buf);
- f = newtForm(NULL, NULL, 0);
+ grid = newtCreateGrid(1, 1);
+ newtGridSetField(grid, 0, 0, NEWT_GRID_COMPONENT, c, 0, 0, 0, 0, 0, 0);
+ newtGridWrappedWindow(grid, title);
+ free(flowed);
free(buf);
+ f = newtForm(NULL, NULL, 0);
newtFormAddComponent(f, c);
newtDrawForm(f);
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index 2ffc54199..721f29dcf 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -164,7 +164,7 @@ static void probe_that_type(enum driver_type type)
#ifndef DISABLE_MEDIAS
if (type == SCSI_ADAPTERS) {
/* insmod takes time, let's use the wait message */
- wait_message("Installing: %s", pcidb[i].name);
+ wait_message("Installing driver for SCSI adapter:\n \n%s", pcidb[i].name);
garb = my_insmod(pcidb[i].module, SCSI_ADAPTERS, NULL);
remove_wait_message();
warning_insmod_failed(garb);