summaryrefslogtreecommitdiff
path: root/src/shared/condition.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-08-29 11:09:48 +0200
committerLennart Poettering <lennart@poettering.net>2022-09-01 23:16:13 +0200
commit4803b0bcaa21616d2feb8e38998a95e28aa43d54 (patch)
treef6d471329a7a6bf9fabdfee394e1bb6c3e2e7ef3 /src/shared/condition.c
parent5f6b2d394b4e2d9dbad16e386d6bd9083ea40393 (diff)
downloadsystemd-4803b0bcaa21616d2feb8e38998a95e28aa43d54.tar.gz
compare: add macro for operator charset
Diffstat (limited to 'src/shared/condition.c')
-rw-r--r--src/shared/condition.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/condition.c b/src/shared/condition.c
index 4e5702bc41..2d9979b9c4 100644
--- a/src/shared/condition.c
+++ b/src/shared/condition.c
@@ -257,7 +257,7 @@ static int condition_test_osrelease(Condition *c, char **env) {
/* parse_compare_operator() needs the string to start with the comparators */
word = condition;
- r = extract_first_word(&word, &key, "!<=>$", EXTRACT_RETAIN_SEPARATORS);
+ r = extract_first_word(&word, &key, COMPARE_OPERATOR_WITH_FNMATCH_CHARS, EXTRACT_RETAIN_SEPARATORS);
if (r < 0)
return log_debug_errno(r, "Failed to parse parameter: %m");
/* The os-release spec mandates env-var-like key names */
@@ -518,7 +518,7 @@ static int condition_test_firmware_smbios_field(const char *expression) {
assert(expression);
/* Parse SMBIOS field */
- r = extract_first_word(&expression, &field, "!<=>$", EXTRACT_RETAIN_SEPARATORS);
+ r = extract_first_word(&expression, &field, COMPARE_OPERATOR_WITH_FNMATCH_CHARS, EXTRACT_RETAIN_SEPARATORS);
if (r < 0)
return r;
if (r == 0 || isempty(expression))