summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/hush.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 65f0865..77f90f8 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -10163,7 +10163,8 @@ int hush_main(int argc, char **argv)
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/sh.html */
flags = (argv[0] && argv[0][0] == '-') ? OPT_login : 0;
while (1) {
- int opt = getopt(argc, argv, "+cexinsl"
+ int opt = getopt(argc, argv, "+" /* stop at 1st non-option */
+ "cexinsl"
#if !BB_MMU
"<:$:R:V:"
# if ENABLE_HUSH_FUNCTIONS
@@ -10255,12 +10256,13 @@ int hush_main(int argc, char **argv)
}
# endif
#endif
- case 'n':
- case 'x':
- case 'e':
+ /*case '?': invalid option encountered (set_mode('?') will fail) */
+ /*case 'n':*/
+ /*case 'x':*/
+ /*case 'e':*/
+ default:
if (set_mode(1, opt, NULL) == 0) /* no error */
break;
- default:
bb_show_usage();
}
} /* option parsing loop */