From 666d314a743a59005b4ccef5df5811bd135a3d9d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 29 Aug 2022 11:10:38 +0200 Subject: [PATCH] condition: allow literal string compares in SMBIOS condition This ensures that "=" and "!=" are now interpreted as literal string compares, and "==" and "<>" are for version compares. This is not a compat break, since the SMBIOS stuff has not been included in any release yet. Main reason to do this, is to be systematic with the other conditions that check for text stuff. --- src/shared/condition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/condition.c b/src/shared/condition.c index f893937156..6c8023143b 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -528,7 +528,7 @@ static int condition_test_firmware_smbios_field(const char *expression) { delete_trailing_chars(field, WHITESPACE); /* Parse operator */ - operator = parse_compare_operator(&expression, COMPARE_ALLOW_FNMATCH); + operator = parse_compare_operator(&expression, COMPARE_ALLOW_FNMATCH|COMPARE_EQUAL_BY_STRING); if (operator < 0) return operator;