The --version option should imply --quiet.

Patch from 'maker'.
This commit is contained in:
Nick Mathewson 2012-10-01 11:01:18 -04:00
parent f128baf36c
commit a80d8e09d3
2 changed files with 5 additions and 0 deletions

2
changes/ticket6997 Normal file
View File

@ -0,0 +1,2 @@
o Minor bugfixes:
- Command-line option "--version" implies "--quiet". Closes ticket #6997.

View File

@ -2293,6 +2293,9 @@ tor_init(int argc, char *argv[])
quiet = 1; quiet = 1;
if (!strcmp(argv[i], "--quiet")) if (!strcmp(argv[i], "--quiet"))
quiet = 2; quiet = 2;
/* --version implies --quiet */
if (!strcmp(argv[i], "--version"))
quiet = 2;
} }
/* give it somewhere to log to initially */ /* give it somewhere to log to initially */
switch (quiet) { switch (quiet) {