</row>
</tbody>
</tgroup>
- </table></listitem>
+ </table>
+
+ <para>Supported glob wilcard patterns are <literal>?</literal>, <literal>*</literal>, and
+ <literal>[…]</literal> (including ranges). Note that these patterns use the same syntax as
+ <citerefentry><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>, but do not
+ support all features. In particular, set negation and named character classes are not supported. The
+ matching is done case-insensitively on the entry ID (as shown by <command>bootctl
+ list</command>).</para></listitem>
</varlistentry>
<varlistentry>
}
if (streq8((char *) key, "default")) {
- if (value[0] == '@' && !streq8((char *) value, "@saved")) {
+ if (value[0] == '@' && !strcaseeq8((char *) value, "@saved")) {
log_error_stall(L"Unsupported special entry identifier: %a", value);
continue;
}
(void) efivar_get(LOADER_GUID, L"LoaderEntryDefault", &config->entry_default_efivar);
+ strtolower16(config->entry_default_config);
+ strtolower16(config->entry_default_efivar);
+ strtolower16(config->entry_oneshot);
+ strtolower16(config->entry_saved);
+
config->use_saved_entry = streq16(config->entry_default_config, L"@saved");
config->use_saved_entry_efivar = streq16(config->entry_default_efivar, L"@saved");
if (config->use_saved_entry || config->use_saved_entry_efivar)
return CMP(a->tries_done, b->tries_done);
}
-static UINTN config_entry_find(Config *config, const CHAR16 *needle) {
+static UINTN config_entry_find(Config *config, const CHAR16 *pattern) {
assert(config);
- if (!needle)
+ /* We expect pattern and entry IDs to be already case folded. */
+
+ if (!pattern)
return IDX_INVALID;
for (UINTN i = 0; i < config->entry_count; i++)
- if (MetaiMatch(config->entries[i]->id, (CHAR16*) needle))
+ if (efi_fnmatch(pattern, config->entries[i]->id))
return i;
return IDX_INVALID;