diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-31 05:14:31 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-31 05:41:31 +0200 |
commit | 19fbf49cdec0e12fa0ee13d6ff6f858ea0f27479 (patch) | |
tree | 3f58d21d086ab32141ca12bff86cde908c3e0257 /src/systemctl/systemctl.c | |
parent | build: only install tmpfiles.d/systemd-remote.conf when necessary (#6051) (diff) | |
download | systemd-19fbf49cdec0e12fa0ee13d6ff6f858ea0f27479.tar.xz systemd-19fbf49cdec0e12fa0ee13d6ff6f858ea0f27479.zip |
systemctl: avoid spurious warning about missing reboot-param file
$ reboot -f
Failed to read reboot parameter file: No such file or directory
It seems that the warning on ENOENT was inadvertently introduced in
27c06cb516c3b87c34f2a1c2c227152997d05c8c.
The warning reported in #5646 comes from systemctl, but let's fix the other
call site in the same way too.
Fixes #5646.
Diffstat (limited to '')
-rw-r--r-- | src/systemctl/systemctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 8b42a93ba3..2f69e863c5 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -8260,7 +8260,7 @@ static int halt_now(enum action a) { _cleanup_free_ char *param = NULL; r = read_one_line_file("/run/systemd/reboot-param", ¶m); - if (r < 0) + if (r < 0 && r != -ENOENT) log_warning_errno(r, "Failed to read reboot parameter file: %m"); if (!isempty(param)) { |