]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
logger: --stderr and --no-act turn "auto-errors" on
authorRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 26 Mar 2015 13:20:29 +0000 (14:20 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 29 Apr 2015 10:31:33 +0000 (12:31 +0200)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
misc-utils/logger.c

index 6316a76fc1aa464af59a1820983c3367e1fd7f85..8908dfcc1062fb77d0a7b67481275ba1fbaf2ed7 100644 (file)
@@ -914,10 +914,9 @@ int main(int argc, char **argv)
                ctl.unix_socket_errors = 1;
                break;
        case AF_UNIX_ERRORS_AUTO:
+               ctl.unix_socket_errors = ctl.noact || ctl.stderr_printout;
 #ifdef HAVE_LIBSYSTEMD
-               ctl.unix_socket_errors = sd_booted();
-#else
-               ctl.unix_socket_errors = 0;
+               ctl.unix_socket_errors |= !!sd_booted();
 #endif
                break;
        default: