Fix: do not print error and bug messages when quiet (-q) is present
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 11 Jan 2016 22:32:14 +0000 (17:32 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 13 Jan 2016 21:04:41 +0000 (16:04 -0500)
Conform to the lttng man page

fixes #988

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/error.h

index 00519d840c65f20475b61c8b4ab43506728ad754..5fff3be1a8ad52050c021be593b6bd2008f4937f 100644 (file)
@@ -80,9 +80,8 @@ extern int lttng_opt_mi;
                                ((type & (PRINT_DBG | PRINT_DBG2 | PRINT_DBG3)) &&  \
                                        lttng_opt_verbose == 3))) {                     \
                        fprintf(stderr, fmt, ## args);                          \
-               } else if (lttng_opt_quiet == 0 && (type & (PRINT_WARN))) { \
-                       fprintf(stderr, fmt, ## args);                          \
-               } else if (type & (PRINT_ERR | PRINT_BUG)) {                \
+               } else if (lttng_opt_quiet == 0 &&                          \
+                               (type & (PRINT_WARN | PRINT_ERR | PRINT_BUG))) {    \
                        fprintf(stderr, fmt, ## args);                          \
                }                                                           \
        } while (0);
This page took 0.027368 seconds and 4 git commands to generate.