diff --git a/src/bootchooser.c b/src/bootchooser.c index 679c93977..d769ab5af 100644 --- a/src/bootchooser.c +++ b/src/bootchooser.c @@ -1159,11 +1159,19 @@ static gboolean efi_bootorder_get(GList **bootorder_entries, GList **all_entries } while (g_match_info_matches(match)) { + gchar * tab_point; efi_bootentry *entry = g_new0(efi_bootentry, 1); entry->num = g_match_info_fetch(match, 1); entry->name = g_match_info_fetch(match, 2); + + /* Remove anything after a tab (as it is most likely data) */ + tab_point = strchr(entry->name, '\t'); + if (tab_point) + *tab_point = '\0'; + entries = g_list_append(entries, entry); g_match_info_next(match, NULL); + g_debug("Detected boot entry %s: %s", entry->num, entry->name); } g_clear_pointer(®ex, g_regex_unref);