diff options
| author | Phil Sutter <phil@nwl.cc> | 2015-10-15 21:01:16 +0200 |
|---|---|---|
| committer | Stephen Hemminger <shemming@brocade.com> | 2015-10-18 21:56:55 -0700 |
| commit | f73105ab42795422f131fb711712e3c860df982f (patch) | |
| tree | e08783a2bbc91a27a55cdc0c31bc169c19087fad | |
| parent | 6f07f3dc41545657c0364eb17850b946f41861bf (diff) | |
| download | android_external_iproute2-f73105ab42795422f131fb711712e3c860df982f.tar.gz android_external_iproute2-f73105ab42795422f131fb711712e3c860df982f.tar.bz2 android_external_iproute2-f73105ab42795422f131fb711712e3c860df982f.zip | |
ss: return -1 if an unrecognized option was given
When getopt_long encounters an option which has not been registered, it
returns '?'. React upon that and call usage() instead of help() so ss
returns with a non-zero exit status.
Signed-off-by: Phil Sutter <phil@nwl.cc>
| -rw-r--r-- | misc/ss.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3770,8 +3770,8 @@ int main(int argc, char *argv[]) exit(1); break; case 'h': - case '?': help(); + case '?': default: usage(); } |
