sd-device: expose device_cache_sysattr_value() and device_get_cached_sysattr_value()
This commit is contained in:
@@ -18,13 +18,15 @@ static inline int device_new_from_watch_handle(sd_device **ret, int wd) {
|
||||
}
|
||||
|
||||
int device_get_device_id(sd_device *device, const char **ret);
|
||||
|
||||
int device_get_devlink_priority(sd_device *device, int *priority);
|
||||
int device_get_watch_handle(sd_device *device);
|
||||
int device_get_devnode_mode(sd_device *device, mode_t *mode);
|
||||
int device_get_devnode_uid(sd_device *device, uid_t *uid);
|
||||
int device_get_devnode_gid(sd_device *device, gid_t *gid);
|
||||
|
||||
int device_cache_sysattr_value(sd_device *device, const char *key, char *value);
|
||||
int device_get_cached_sysattr_value(sd_device *device, const char *key, const char **ret_value);
|
||||
|
||||
void device_seal(sd_device *device);
|
||||
void device_set_is_initialized(sd_device *device);
|
||||
int device_set_watch_handle(sd_device *device, int wd);
|
||||
|
||||
@@ -1941,7 +1941,7 @@ _public_ int sd_device_get_trigger_uuid(sd_device *device, sd_id128_t *ret) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int device_cache_sysattr_value(sd_device *device, const char *key, char *value) {
|
||||
int device_cache_sysattr_value(sd_device *device, const char *key, char *value) {
|
||||
_unused_ _cleanup_free_ char *old_value = NULL;
|
||||
_cleanup_free_ char *new_key = NULL;
|
||||
int r;
|
||||
@@ -1969,7 +1969,7 @@ static int device_cache_sysattr_value(sd_device *device, const char *key, char *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int device_get_cached_sysattr_value(sd_device *device, const char *key, const char **ret_value) {
|
||||
int device_get_cached_sysattr_value(sd_device *device, const char *key, const char **ret_value) {
|
||||
const char *k = NULL, *value;
|
||||
|
||||
assert(device);
|
||||
|
||||
Reference in New Issue
Block a user