From f8444295347b87e1df73cda78cd23ddb2f4bd7fd Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 5 Oct 2026 12:13:57 -0500 Subject: [PATCH] bootctl: don't fail 'status' when the ESP has no random seed Since f90efd2d13aac38417b2e0e08068fc0fba2da72a the result of the access() check for loader/random-seed is stored in 'r', which is what verb_status() returns. A missing seed file then makes 'bootctl status' exit with 1 without logging anything, even though it's only reported as "Exists: no". Use 'k' for the check, like the other informational probes in this function. (cherry picked from commit 05808e11b9399e6c2149f1f524b3282545ba7569) --- src/bootctl/bootctl-status.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootctl/bootctl-status.c b/src/bootctl/bootctl-status.c index 8ac2444744..bd8d47a2e9 100644 --- a/src/bootctl/bootctl-status.c +++ b/src/bootctl/bootctl-status.c @@ -621,11 +621,11 @@ int verb_status(int argc, char *argv[], uintptr_t _data, void *userdata) { if (!p) return log_oom(); - r = access(p, F_OK); - if (r < 0 && errno != ENOENT) + k = access(p, F_OK); + if (k < 0 && errno != ENOENT) printf(" Exists: Can't access %s (%m)\n", p); else - printf(" Exists: %s\n", yes_no(r >= 0)); + printf(" Exists: %s\n", yes_no(k >= 0)); } printf("\n");