The machine types in QEMU firmware descriptions are glob patterns
like "pc-q35-*", so we use strstr() substring matching to check if
our machine type is covered by a given firmware entry.
if (!streq((*t)->architecture, arch))
continue;
+ /* The machine types in firmware descriptions are glob patterns such as "pc-q35-*", but
+ * we pass the short alias (e.g. "q35") as the machine type to QEMU as it always points to
+ * the latest version. We can't use fnmatch() here because "q35" doesn't match the
+ * "pc-q35-*" glob, so instead we use substring matching to check if our machine type
+ * appears in the pattern. */
STRV_FOREACH(m, (*t)->machines)
if (strstr(*m, machine))
return true;