cgroup-util: rename cg_get_xattr_malloc -> cg_get_xattr

This is not a trivial wrapper around user-created-buffer-based
syscall, so do not use _malloc suffix. Most of our functions
return an internally allocated buffer and this one's not special.
This commit is contained in:
Mike Yuan
2025-05-27 14:28:08 +02:00
parent c5d7a2d000
commit 7b4022bdb0
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -592,7 +592,7 @@ int cg_set_xattr(const char *path, const char *name, const void *value, size_t s
return RET_NERRNO(setxattr(fs, name, value, size, flags));
}
int cg_get_xattr_malloc(const char *path, const char *name, char **ret, size_t *ret_size) {
int cg_get_xattr(const char *path, const char *name, char **ret, size_t *ret_size) {
_cleanup_free_ char *fs = NULL;
int r;
+1 -1
View File
@@ -226,7 +226,7 @@ int cg_get_attribute_as_bool(const char *controller, const char *path, const cha
int cg_get_owner(const char *path, uid_t *ret_uid);
int cg_set_xattr(const char *path, const char *name, const void *value, size_t size, int flags);
int cg_get_xattr_malloc(const char *path, const char *name, char **ret, size_t *ret_size);
int cg_get_xattr(const char *path, const char *name, char **ret, size_t *ret_size);
/* Returns negative on error, and 0 or 1 on success for the bool value */
int cg_get_xattr_bool(const char *path, const char *name);
int cg_remove_xattr(const char *path, const char *name);