From: Hans de Goede Date: Mon, 20 Jul 2020 13:06:43 +0000 (+0200) Subject: logind: Fix org.freedesktop.login1.set-reboot-to-boot-loader-menu saving to the wrong... X-Git-Tag: v246-rc2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a978b30cd822faef304e790c5740e1587a79e0e;p=thirdparty%2Fsystemd.git logind: Fix org.freedesktop.login1.set-reboot-to-boot-loader-menu saving to the wrong file in the non EFI case According to the docs, and to the org.freedesktop.login1.get-reboot-to-boot-loader-menu code, the (oneshot) boot-loader-menu timeout should be stored in /run/systemd/reboot-to-boot-loader-menu, but the set method was storing it in /run/systemd/reboot-to-loader-menu. This commit fixes this. Note that the fixed name also is a better match for the dbus call names and matches the related /run/systemd/reboot-to-boot-loader-entry structure, so fixing the set code, rather then the get code + docs seems like the right thing to do here. --- diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 1b6304b57f5..75a48300adb 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -2855,14 +2855,14 @@ static int method_set_reboot_to_boot_loader_menu( return r; } else { if (x == UINT64_MAX) { - if (unlink("/run/systemd/reboot-to-loader-menu") < 0 && errno != ENOENT) + if (unlink("/run/systemd/reboot-to-boot-loader-menu") < 0 && errno != ENOENT) return -errno; } else { char buf[DECIMAL_STR_MAX(uint64_t) + 1]; xsprintf(buf, "%" PRIu64, x); /* µs granularity */ - r = write_string_file_atomic_label("/run/systemd/reboot-to-loader-menu", buf); + r = write_string_file_atomic_label("/run/systemd/reboot-to-boot-loader-menu", buf); if (r < 0) return r; }