Skip to content

Commit c388c3f

Browse files
committed
src/bootchooser: support the changed output of efibootmgr 18
Since efibootmgr 18, the default output of `efibootmgr` is now more verbose [1], which breaks the assumptions made by RAUC in regards to parsing the output. This issue is also affecting others [2]. Fix the parsing logic by unconditionally removing anything after a tab in the detected name part of the boot entry, so that the unused data part is discarded. Emit a debug message for each found boot entry, as this helps in detecting issues in the future. [1] rhboot/efibootmgr@8ec3e9d [2] rhboot/efibootmgr#169 Signed-off-by: David Runge <[email protected]>
1 parent 966a86b commit c388c3f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bootchooser.c

+9
Original file line numberDiff line numberDiff line change
@@ -1159,11 +1159,20 @@ static gboolean efi_bootorder_get(GList **bootorder_entries, GList **all_entries
11591159
}
11601160

11611161
while (g_match_info_matches(match)) {
1162+
gchar *tab_point = NULL;
11621163
efi_bootentry *entry = g_new0(efi_bootentry, 1);
11631164
entry->num = g_match_info_fetch(match, 1);
11641165
entry->name = g_match_info_fetch(match, 2);
1166+
1167+
/* Remove anything after a tab, as it is most likely path
1168+
* information which we don't need. */
1169+
tab_point = strchr(entry->name, '\t');
1170+
if (tab_point)
1171+
*tab_point = '\0';
1172+
11651173
entries = g_list_append(entries, entry);
11661174
g_match_info_next(match, NULL);
1175+
g_debug("Detected EFI boot entry %s: %s", entry->num, entry->name);
11671176
}
11681177

11691178
g_clear_pointer(&regex, g_regex_unref);

0 commit comments

Comments
 (0)