return 0;
}
- return log_error_errno(SYNTHETIC_ERRNO(ENOTTY), "No free VT found: %m");
+ return -ENOTTY;
}
static int display_emergency_message_fullscreen(const char *message) {
r = acquire_first_emergency_log_message(&message);
if (r < 0)
- return log_error_errno(r, "Failed to acquire first emergency log message: %m");
+ return r;
if (!message) {
log_debug("No emergency-level entries");
assert_se(sigaction_many(&nop_sigaction, SIGTERM, SIGINT) >= 0);
- r = display_emergency_message_fullscreen((const char*) message);
- if (r < 0)
- return log_error_errno(r, "Failed to display emergency message on terminal: %m");
-
- return 0;
+ return display_emergency_message_fullscreen(message);
}
DEFINE_MAIN_FUNCTION(run);