]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
log: don't explicitly re-open log for failed assertions
authorFranck Bui <fbui@suse.com>
Mon, 3 Aug 2020 15:50:11 +0000 (17:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 18 Aug 2020 08:31:25 +0000 (10:31 +0200)
This was needed before commit 16e4fd87c5be06d2b7a3b368205c8c5bab9df32a added a
mode that opens the log fds for every single log message. This mode is used in
execute.c since then making the explicit call to log_open unnecessary.

This basically reverts ea89a119cda917a17bd186b3c13197acfd655b12.

src/basic/log.c

index c6fe20380830b9e6ff78ac869b392c213798565e..899a8423f22d6eea59d84e2ca04a34a857b3ff6a 100644 (file)
@@ -838,7 +838,6 @@ _noreturn_ void log_assert_failed_realm(
                 const char *file,
                 int line,
                 const char *func) {
-        (void) log_open();
         log_assert(LOG_REALM_PLUS_LEVEL(realm, LOG_CRIT), text, file, line, func,
                    "Assertion '%s' failed at %s:%u, function %s(). Aborting.");
         abort();
@@ -850,7 +849,6 @@ _noreturn_ void log_assert_failed_unreachable_realm(
                 const char *file,
                 int line,
                 const char *func) {
-        (void) log_open();
         log_assert(LOG_REALM_PLUS_LEVEL(realm, LOG_CRIT), text, file, line, func,
                    "Code should not be reached '%s' at %s:%u, function %s(). Aborting.");
         abort();