diff options
author | Mike Frysinger | 2009-03-28 13:02:11 +0000 |
---|---|---|
committer | Mike Frysinger | 2009-03-28 13:02:11 +0000 |
commit | 19a7ea126a6f05232ee7d4b786bafab8e28a8beb (patch) | |
tree | cf116d828bfc184d9ea148cae04bec68e5b4770c /shell | |
parent | a71cfa8aa15b7fbc84f3d011b48b6243060c5060 (diff) | |
download | busybox-19a7ea126a6f05232ee7d4b786bafab8e28a8beb.zip busybox-19a7ea126a6f05232ee7d4b786bafab8e28a8beb.tar.gz |
handle the "-s" command line option that POSIX requires
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index 65babdf..2dd59bb 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -4238,7 +4238,8 @@ int hush_main(int argc, char **argv) } input = stdin; - while ((opt = getopt(argc, argv, "c:xin")) > 0) { + /* http://www.opengroup.org/onlinepubs/9699919799/utilities/sh.html */ + while ((opt = getopt(argc, argv, "c:xins")) > 0) { switch (opt) { case 'c': G.global_argv = argv + optind; @@ -4258,6 +4259,10 @@ int hush_main(int argc, char **argv) case 'n': G.fake_mode = 1; break; + case 's': + /* "-s" means "read from stdin", but this is how we always + * operate, so simply do nothing here. */ + break; default: #ifndef BB_VER fprintf(stderr, "Usage: sh [FILE]...\n" |