summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/automatic.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-02-07 20:18:21 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-02-07 20:18:21 +0000
commit13e551b64c1c3cd1c6a2025dd9328f908b9f3f39 (patch)
treeb61c877d6c93222ced93769aa9845a73d51d0fea /mdk-stage1/automatic.c
parent57f0c1abdba4b36f2b29477643873b606e17feb2 (diff)
downloaddrakx-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar
drakx-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar.gz
drakx-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar.bz2
drakx-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar.xz
drakx-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.zip
- use description of network cards when you have to select between interfaces; has accuracy even in the case of multiple interface for a given kernel module
- write down a small "shell" to change parameters on the fly (needs compile option SPAWN_INTERACTIVE)
Diffstat (limited to 'mdk-stage1/automatic.c')
-rw-r--r--mdk-stage1/automatic.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/mdk-stage1/automatic.c b/mdk-stage1/automatic.c
index b92cc9e40..57ae1f3a6 100644
--- a/mdk-stage1/automatic.c
+++ b/mdk-stage1/automatic.c
@@ -105,6 +105,28 @@ enum return_type ask_from_list_auto(char *msg, char ** elems, char ** choice, ch
}
}
+enum return_type ask_from_list_comments_auto(char *msg, char ** elems, char ** elems_comments, char ** choice, char * auto_param, char ** elems_auto)
+{
+ if (!IS_AUTOMATIC)
+ return ask_from_list_comments(msg, elems, elems_comments, choice);
+ else {
+ char ** sav_elems = elems;
+ char * tmp = get_auto_value(auto_param);
+ while (elems && *elems) {
+ if (!strcmp(tmp, *elems_auto)) {
+ *choice = *elems;
+ log_message("AUTOMATIC: parameter %s for %s means returning %s", tmp, auto_param, *elems);
+ return RETURN_OK;
+ }
+ elems++;
+ elems_auto++;
+ }
+ unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */
+ return ask_from_list_comments(msg, sav_elems, elems_comments, choice);
+ }
+}
+
+
enum return_type ask_from_entries_auto(char *msg, char ** questions, char *** answers, int entry_size, char ** questions_auto)
{
if (!IS_AUTOMATIC)