]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: improve output regarding random seed if we cannot access ESP
authorLennart Poettering <lennart@poettering.net>
Sun, 9 Feb 2025 06:38:41 +0000 (07:38 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 9 Feb 2025 08:14:21 +0000 (09:14 +0100)
src/bootctl/bootctl-status.c

index 40642d3c1c43e82faaf2f0d89cbfb0d7fbb3a6d8..75ffb9fdba0b696266bf33ec8fa65a587a332026 100644 (file)
@@ -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");