]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #24555 from medhefgo/bootctl
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Nov 2022 11:27:30 +0000 (12:27 +0100)
committerGitHub <noreply@github.com>
Wed, 16 Nov 2022 11:27:30 +0000 (12:27 +0100)
bootctl: Small improvements

1  2 
src/shared/bootspec.c

index 0afc41d200bd03d23f5afbe10cd1cffbdefb0d0a,40dc88f8dcce57bfa3e96e27b415c4d1a73fc114..ff5cd9bc1fbe7cf16e7c5e8b9dba1b3e75add83d
@@@ -1260,9 -1282,13 +1266,13 @@@ static void boot_entry_file_list
          assert(p);
          assert(ret_status);
  
 -        int status = chase_symlinks_and_access(p, root, CHASE_PREFIX_ROOT, F_OK, NULL, NULL);
 +        int status = chase_symlinks_and_access(p, root, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS, F_OK, NULL, NULL);
  
-         printf("%13s%s ", strempty(field), field ? ":" : " ");
+         /* Note that this shows two '/' between the root and the file. This is intentional to highlight (in
+          * the abscence of color support) to the user that the boot loader is only interested in the second
+          * part of the file. */
+         printf("%13s%s %s%s/%s", strempty(field), field ? ":" : " ", ansi_grey(), root, ansi_normal());
          if (status < 0) {
                  errno = -status;
                  printf("%s%s%s (%m)\n", ansi_highlight_red(), p, ansi_normal());