Print location of loader.conf in bootctl status and related updates (#38389)
This commit is contained in:
@@ -83,6 +83,17 @@ static int status_entries(
|
||||
printf(", %s$BOOT%s", ansi_green(), ansi_normal());
|
||||
printf(")");
|
||||
|
||||
if (config->loader_conf_status != 0) {
|
||||
assert(esp_path);
|
||||
printf("\n config: %s%s/%s%s",
|
||||
ansi_grey(), esp_path, ansi_normal(), "/loader/loader.conf");
|
||||
if (config->loader_conf_status < 0)
|
||||
printf(": %s%s%s",
|
||||
config->loader_conf_status == -ENOENT ? ansi_grey() : ansi_highlight_yellow(),
|
||||
STRERROR(config->loader_conf_status),
|
||||
ansi_normal());
|
||||
}
|
||||
|
||||
if (xbootldr_path) {
|
||||
printf("\n XBOOTLDR: %s (", xbootldr_path);
|
||||
if (!sd_id128_is_null(xbootldr_partition_uuid))
|
||||
|
||||
@@ -533,6 +533,7 @@ static int boot_loader_read_conf_path(BootConfig *config, const char *root, cons
|
||||
assert(path);
|
||||
|
||||
r = chase_and_fopen_unlocked(path, root, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS, "re", &full, &f);
|
||||
config->loader_conf_status = r < 0 ? r : true;
|
||||
if (r == -ENOENT)
|
||||
return 0;
|
||||
if (r < 0)
|
||||
|
||||
@@ -67,6 +67,8 @@ typedef struct BootEntry {
|
||||
}
|
||||
|
||||
typedef struct BootConfig {
|
||||
int loader_conf_status; /* 0 → before loading, 1 → loaded, negative → error. */
|
||||
|
||||
char *default_pattern;
|
||||
|
||||
char *entry_oneshot;
|
||||
|
||||
Reference in New Issue
Block a user