From 7b9c9ab810eb8746cece22de1dfec375caf4cd13 Mon Sep 17 00:00:00 2001 From: WaLyong Cho Date: Tue, 28 Jul 2015 02:40:50 +0900 Subject: util: add getxattr helper apis To get xattr of given path or fd on newly allocated buffer, add new helper api getxattr_malloc() and fgetxattr_malloc(). --- src/basic/util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/basic/util.h') diff --git a/src/basic/util.h b/src/basic/util.h index 88c44273d4..0a0fba9012 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -919,3 +919,6 @@ int parse_mode(const char *s, mode_t *ret); int mount_move_root(const char *path); int reset_uid_gid(void); + +int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink); +int fgetxattr_malloc(int fd, const char *name, char **value); -- cgit v1.2.3-54-g00ecf