]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Do not printf success messages when we are --quieted or --hushed.
authorNick Mathewson <nickm@torproject.org>
Sat, 14 Mar 2015 16:12:53 +0000 (12:12 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 14 Mar 2015 16:12:53 +0000 (12:12 -0400)
Fixes 14994. Calling this a bug on when --quiet and --hush began to have
their current behavior.

changes/bug14994 [new file with mode: 0644]
src/or/main.c

diff --git a/changes/bug14994 b/changes/bug14994
new file mode 100644 (file)
index 0000000..aafeac4
--- /dev/null
@@ -0,0 +1,8 @@
+  o Minor bugfixes (command-line interface):
+    - When "--quiet" is provided along with "--validate-config", do not
+      write anything to stdout on success. Fixes bug 14994; bugfix on
+      0.2.3.3-alpha.
+    - When complaining about bad arguments to "--dump-config", use
+      stderr, not stdout.
+
+
index bc89458e871aa43a8f02796c0d20d1bfa5e6afe7..49c1b667ac48145fffe34b41a369d3c6ad7de73f 100644 (file)
@@ -2783,8 +2783,8 @@ do_dump_config(void)
   } else if (!strcmp(arg, "full")) {
     how = OPTIONS_DUMP_ALL;
   } else {
-    printf("%s is not a recognized argument to --dump-config. "
-           "Please select 'short', 'non-builtin', or 'full'", arg);
+    fprintf(stderr, "%s is not a recognized argument to --dump-config. "
+            "Please select 'short', 'non-builtin', or 'full'", arg);
     return -1;
   }
 
@@ -3085,7 +3085,8 @@ tor_main(int argc, char *argv[])
     result = 0;
     break;
   case CMD_VERIFY_CONFIG:
-    printf("Configuration was valid\n");
+    if (get_options()->quiet_level)
+      printf("Configuration was valid\n");
     result = 0;
     break;
   case CMD_DUMP_CONFIG: