aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-08-25 12:59:38 -0400
committerNick Mathewson <nickm@torproject.org>2013-09-13 12:36:39 -0400
commita1096fe1802ee3585dd6296b50085017e1928edf (patch)
tree0944be1e8668c421e861ce5da1a5dbaf2a308973 /src/or/main.c
parent34ec954f8ef8201fd16942acca55ac19db8ff7b7 (diff)
downloadtor-a1096fe1802ee3585dd6296b50085017e1928edf.tar.gz
tor-a1096fe1802ee3585dd6296b50085017e1928edf.zip
Use commandline parser for other options
These were previously allowed only in the initial position: --help, -h , --version, --digests, --list-torrc-options
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index e816a66670..22519f04aa 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2345,8 +2345,9 @@ tor_init(int argc, char *argv[])
quiet = 1;
if (!strcmp(cl->key, "--quiet"))
quiet = 2;
- /* --version implies --quiet */
- if (!strcmp(cl->key, "--version"))
+ /* --version and --help imply --quiet */
+ if (!strcmp(cl->key, "--version") ||
+ !strcmp(cl->key, "-h") || !strcmp(cl->key, "--help"))
quiet = 2;
}
config_free_lines(opts);