summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/frontend-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/frontend-common.c')
-rw-r--r--mdk-stage1/frontend-common.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/mdk-stage1/frontend-common.c b/mdk-stage1/frontend-common.c
index fac4bccd0..cdc972740 100644
--- a/mdk-stage1/frontend-common.c
+++ b/mdk-stage1/frontend-common.c
@@ -1,7 +1,7 @@
/*
- * Guillaume Cottenceau (gc@mandrakesoft.com)
+ * Guillaume Cottenceau (gc)
*
- * Copyright 2000 MandrakeSoft
+ * Copyright 2000 Mandriva
*
* This software may be freely redistributed under the terms of the GNU
* public license.
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <stdarg.h>
+#include <string.h>
#include <probing.h>
@@ -23,7 +24,6 @@
void info_message(char *msg, ...)
{
va_list args;
- probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...
va_start(args, msg);
vinfo_message(msg, args);
va_end(args);
@@ -40,8 +40,25 @@ void wait_message(char *msg, ...)
void error_message(char *msg, ...)
{
va_list args;
- probe_that_type(USB_CONTROLLERS, BUS_USB); // we'd need the keyboard for interactions so...
va_start(args, msg);
verror_message(msg, args);
va_end(args);
}
+
+enum return_type ask_from_list_comments(char *msg, char ** elems, char ** elems_comments, char ** choice)
+{
+ int answer = 0;
+ enum return_type results;
+
+ results = ask_from_list_index(msg, elems, elems_comments, &answer);
+
+ if (results == RETURN_OK)
+ *choice = strdup(elems[answer]);
+
+ return results;
+}
+
+enum return_type ask_from_list(char *msg, char ** elems, char ** choice)
+{
+ return ask_from_list_comments(msg, elems, NULL, choice);
+}