randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-08-10 00:51:29 +02:00
parent b347df9131
commit b47b3ce1bd
8 changed files with 32 additions and 8 deletions

View File

@ -467,13 +467,17 @@ getopt32(char **argv, const char *applet_opts, ...)
}
for (on_off = complementary; on_off->opt_char; on_off++)
if (on_off->opt_char == *s)
break;
goto found_opt;
/* Without this, diagnostic of such bugs is not easy */
bb_error_msg_and_die("NO OPT %c!", *s);
found_opt:
if (c == ':' && s[2] == ':') {
on_off->param_type = PARAM_LIST;
continue;
}
if (c == '+' && (s[2] == ':' || s[2] == '\0')) {
on_off->param_type = PARAM_INT;
s++;
continue;
}
if (c == ':' || c == '\0') {