From 5ec6802e4c1a84a31bc33ed5b1f2b9133e233e00 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 4 Dec 2001 20:04:48 +0000 Subject: support shorter versions of automatic keywords to beat problems with very long kernel commandlines --- mdk-stage1/automatic.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'mdk-stage1/automatic.c') diff --git a/mdk-stage1/automatic.c b/mdk-stage1/automatic.c index 486a829de..144166240 100644 --- a/mdk-stage1/automatic.c +++ b/mdk-stage1/automatic.c @@ -74,8 +74,21 @@ char * get_auto_value(char * auto_param) { struct param_elem * ptr = automatic_params; + struct param_elem short_aliases[] = + { { "method", "met" }, { "network", "netw" }, { "interface", "int" }, { "gateway", "gat" }, + { "netmask", "netm" }, { "adsluser", "adslu" }, { "adslpass", "adslp" }, { "hostname", "hos" }, + { "domain", "dom" }, { "server", "ser" }, { "directory", "dir" }, { "user", "use" }, + { "pass", "pas" }, { "disk", "dis" }, { "partition", "par" }, { NULL } }; + struct param_elem * ptr_alias = short_aliases; + while (ptr_alias->name) { + if (streq(auto_param, ptr_alias->name)) + break; + ptr_alias++; + } + while (ptr->name) { - if (!strcmp(ptr->name, auto_param)) + if (streq(ptr->name, auto_param) + || (ptr_alias->name && streq(ptr_alias->value, ptr->name))) return ptr->value; ptr++; } -- cgit v1.2.1