compare: drop use of FNM_EXTMATCH for now

None of our other fnmatch() calls make use of this, and the concept was
new to me at least. Given that this is only used for the recently added
SMBIOS field matches (and is not included in any release) let's disable
"extended" matches for now. We can certainly revisit this, and enable it
later if there is real demand, but if we do, we should probably add that
all over the place, not just for smbios matches.
This commit is contained in:
Lennart Poettering
2022-09-01 23:15:14 +02:00
parent 8bd2cf6e11
commit 97c7bed90a
+2 -2
View File
@@ -74,10 +74,10 @@ int version_or_fnmatch_compare(
switch (op) {
case COMPARE_FNMATCH_EQUAL:
return fnmatch(b, a, FNM_EXTMATCH) != FNM_NOMATCH;
return fnmatch(b, a, 0) != FNM_NOMATCH;
case COMPARE_FNMATCH_UNEQUAL:
return fnmatch(b, a, FNM_EXTMATCH) == FNM_NOMATCH;
return fnmatch(b, a, 0) == FNM_NOMATCH;
case _COMPARE_OPERATOR_ORDER_FIRST..._COMPARE_OPERATOR_ORDER_LAST:
return test_order(strverscmp_improved(a, b), op);