bootspec: parse/show devicetree-overlay field too
It has been defined in the boot loader spec, and is the only field we currently don't parse, hence fix that.
This commit is contained in:
+10
-1
@@ -51,6 +51,7 @@ static void boot_entry_free(BootEntry *entry) {
|
||||
free(entry->efi);
|
||||
strv_free(entry->initrd);
|
||||
free(entry->device_tree);
|
||||
strv_free(entry->device_tree_overlay);
|
||||
}
|
||||
|
||||
static int boot_entry_load(
|
||||
@@ -144,7 +145,15 @@ static int boot_entry_load(
|
||||
r = strv_extend(&tmp.initrd, p);
|
||||
else if (streq(field, "devicetree"))
|
||||
r = free_and_strdup(&tmp.device_tree, p);
|
||||
else {
|
||||
else if (streq(field, "devicetree-overlay")) {
|
||||
_cleanup_strv_free_ char **l = NULL;
|
||||
|
||||
l = strv_split(p, NULL);
|
||||
if (!l)
|
||||
return log_oom();
|
||||
|
||||
r = strv_extend_strv(&tmp.device_tree_overlay, l, false);
|
||||
} else {
|
||||
log_notice("%s:%u: Unknown line \"%s\", ignoring.", path, line, field);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ typedef struct BootEntry {
|
||||
char *efi;
|
||||
char **initrd;
|
||||
char *device_tree;
|
||||
char **device_tree_overlay;
|
||||
} BootEntry;
|
||||
|
||||
typedef struct BootConfig {
|
||||
|
||||
Reference in New Issue
Block a user