Merge pull request #31057 from aafeijoo-suse/bootctl-print-fix

bootctl: return earlier with `--print-esp-path`
This commit is contained in:
Lennart Poettering 2024-01-23 14:26:25 +01:00 committed by GitHub
commit 3bda8bc58c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

@ -353,7 +353,7 @@
Specification Type #2 entries should be placed in the directory <literal>$(bootctl
-x)/EFI/Linux/</literal>.</para>
<para>Note that this option (similarly to the <option>--print-boot-path</option> option mentioned
<para>Note that this option (similarly to the <option>--print-esp-path</option> option mentioned
above), is available independently from the boot loader used, i.e. also without
<command>systemd-boot</command> being installed.</para>

View file

@ -326,6 +326,7 @@ int verb_status(int argc, char *argv[], void *userdata) {
return r;
puts(arg_esp_path);
return 0;
}
r = acquire_xbootldr(/* unprivileged_mode= */ -1, &xbootldr_uuid, &xbootldr_devid);
@ -340,10 +341,8 @@ int verb_status(int argc, char *argv[], void *userdata) {
return log_error_errno(SYNTHETIC_ERRNO(EACCES), "Failed to determine XBOOTLDR location: %m");
puts(path);
}
if (arg_print_esp_path || arg_print_dollar_boot_path)
return 0;
}
r = 0; /* If we couldn't determine the path, then don't consider that a problem from here on, just
* show what we can show */