From: David Tardon Date: Mon, 13 Nov 2023 15:20:09 +0000 (+0100) Subject: udev-rules: use udev_get_property_value() X-Git-Tag: v255-rc2~23^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57f6950eb919066348d26f73652901c48f5876d8;p=thirdparty%2Fsystemd.git udev-rules: use udev_get_property_value() --- diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index abb44e99241..d30c2f923e9 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1981,10 +1981,9 @@ static int udev_rule_apply_token_to_event( case TK_M_NAME: return token_match_string(token, event->name); case TK_M_ENV: { - const char *val; + const char *val = NULL; - if (sd_device_get_property_value(dev, token->data, &val) < 0) - val = hashmap_get(properties_list, token->data); + (void) device_get_property_value_with_fallback(dev, token->data, properties_list, &val); return token_match_string(token, val); }