}
int getxattr_at_strv(int fd, const char *path, const char *name, int at_flags, char ***ret_strv) {
+ _cleanup_free_ char *nulstr = NULL;
+ size_t nulstr_size;
int r;
- _cleanup_free_ char *nulstr = NULL;
- size_t nulstr_size = 0;
+ assert(ret_strv);
r = getxattr_at_malloc(fd, path, name, at_flags, &nulstr, &nulstr_size);
if (r < 0)
return 0;
}
-int xsetxattr_strv(int fd, const char *path, int at_flags, const char *name, char * const* l) {
+int xsetxattr_strv(int fd, const char *path, int at_flags, const char *name, char * const *l) {
+ _cleanup_free_ char *nulstr = NULL;
+ size_t size;
int r;
- _cleanup_free_ char *nulstr = NULL;
- size_t size = 0;
+ assert(name);
+
r = strv_make_nulstr(l, &nulstr, &size);
if (r < 0)
return r;
return xsetxattr_full(fd, path, at_flags, name, value, SIZE_MAX, 0);
}
-int xsetxattr_strv(int fd, const char *path, int at_flags, const char *name, char *const*l);
+int xsetxattr_strv(int fd, const char *path, int at_flags, const char *name, char * const *l);
int xremovexattr(int fd, const char *path, int at_flags, const char *name);