Merge pull request #6060 from keszybz/reboot-f-warning

systemctl: avoid spurious warning about missing reboot-param file
This commit is contained in:
Djalal Harouni
2017-05-31 16:57:54 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -403,7 +403,7 @@ int main(int argc, char *argv[]) {
_cleanup_free_ char *param = NULL;
r = read_one_line_file("/run/systemd/reboot-param", &param);
if (r < 0)
if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Failed to read reboot parameter file: %m");
if (!isempty(param)) {
+1 -1
View File
@@ -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", &param);
if (r < 0)
if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Failed to read reboot parameter file: %m");
if (!isempty(param)) {