From: Mike Yuan Date: Wed, 5 Mar 2025 17:22:19 +0000 (+0100) Subject: core/main: assign mac_init() retval to r X-Git-Tag: v257.5~118 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e19548b78f2c7e2e921403d3ce8543143c313209;p=thirdparty%2Fsystemd.git core/main: assign mac_init() retval to r If it fails, we'd submit the errno to supervisor via sd_notify() later. (cherry picked from commit 550f4718bc6b11d8801af3b7eb888aa4ba0fdc90) --- diff --git a/src/core/main.c b/src/core/main.c index 74dab2e62b2..7d2b3a1ce69 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -3131,7 +3131,8 @@ int main(int argc, char *argv[]) { goto finish; } - if (mac_init() < 0) { + r = mac_init(); + if (r < 0) { error_message = "Failed to initialize MAC support"; goto finish; } @@ -3211,7 +3212,8 @@ int main(int argc, char *argv[]) { /* clear the kernel timestamp, because we are not PID 1 */ kernel_timestamp = DUAL_TIMESTAMP_NULL; - if (mac_init() < 0) { + r = mac_init(); + if (r < 0) { error_message = "Failed to initialize MAC support"; goto finish; }