From: Yu Watanabe Date: Thu, 6 Apr 2023 23:50:54 +0000 (+0900) Subject: sd-device: manage cached sysattr values with path_hash_ops X-Git-Tag: v254-rc1~761^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f5a8d7c361f0a3e479bc5c2d2a8cee25ea54d9d;p=thirdparty%2Fsystemd.git sd-device: manage cached sysattr values with path_hash_ops As here keys are relative paths to sysattrs. --- diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c index 5d486957ceb..58067414cd0 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -2294,7 +2294,7 @@ int device_cache_sysattr_value(sd_device *device, const char *key, char *value) return -ENOMEM; } - r = hashmap_ensure_put(&device->sysattr_values, &string_hash_ops_free_free, new_key, value); + r = hashmap_ensure_put(&device->sysattr_values, &path_hash_ops_free_free, new_key, value); if (r < 0) return r;