From f90efd2d13aac38417b2e0e08068fc0fba2da72a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 9 Feb 2025 07:38:41 +0100 Subject: [PATCH] bootctl: improve output regarding random seed if we cannot access ESP --- src/bootctl/bootctl-status.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bootctl/bootctl-status.c b/src/bootctl/bootctl-status.c index 40642d3c1c4..75ffb9fdba0 100644 --- a/src/bootctl/bootctl-status.c +++ b/src/bootctl/bootctl-status.c @@ -534,8 +534,11 @@ int verb_status(int argc, char *argv[], void *userdata) { if (!p) return log_oom(); - have = access(p, F_OK) >= 0; - printf(" Exists: %s\n", yes_no(have)); + r = access(p, F_OK); + if (r < 0 && errno != ENOENT) + printf(" Exists: Can't access %s (%m)\n", p); + else + printf(" Exists: %s\n", yes_no(r >= 0)); } printf("\n");