From: MaxHearnden Date: Thu, 18 Apr 2024 00:44:22 +0000 (+0100) Subject: systemctl: allow user to suppress output when no action scheduled (#32278) X-Git-Tag: v256-rc1~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bccd7be32854d3ca3c7638f0cd4c44539fa0dcee;p=thirdparty%2Fsystemd.git systemctl: allow user to suppress output when no action scheduled (#32278) --- diff --git a/src/systemctl/systemctl-logind.c b/src/systemctl/systemctl-logind.c index 1147c96683d..d6cdd9748f5 100644 --- a/src/systemctl/systemctl-logind.c +++ b/src/systemctl/systemctl-logind.c @@ -397,7 +397,7 @@ int logind_show_shutdown(void) { return r; if (isempty(action)) - return log_error_errno(SYNTHETIC_ERRNO(ENODATA), "No scheduled shutdown."); + return log_full_errno(arg_quiet ? LOG_DEBUG : LOG_ERR, SYNTHETIC_ERRNO(ENODATA), "No scheduled shutdown."); if (STR_IN_SET(action, "halt", "poweroff", "exit")) pretty_action = "Shutdown";