diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-08-29 11:09:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-09-01 23:16:13 +0200 |
commit | 4803b0bcaa21616d2feb8e38998a95e28aa43d54 (patch) | |
tree | f6d471329a7a6bf9fabdfee394e1bb6c3e2e7ef3 /src/shared/condition.c | |
parent | compare: propagate errors of fnmatch() as errors (diff) | |
download | systemd-4803b0bcaa21616d2feb8e38998a95e28aa43d54.tar.xz systemd-4803b0bcaa21616d2feb8e38998a95e28aa43d54.zip |
compare: add macro for operator charset
Diffstat (limited to 'src/shared/condition.c')
-rw-r--r-- | src/shared/condition.c | 4 |
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)) |