]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: allow user to suppress output when no action scheduled (#32278)
authorMaxHearnden <MaxHearnden@users.noreply.github.com>
Thu, 18 Apr 2024 00:44:22 +0000 (01:44 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Apr 2024 00:44:22 +0000 (09:44 +0900)
src/systemctl/systemctl-logind.c

index 1147c96683d8f0fe7b9b835fd9b3381c64304583..d6cdd9748f5e597d112f7f28521f2b5b975ceed7 100644 (file)
@@ -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";