CONFUGA_API int confuga_lgetxattr(confuga *C, const char *path, const char *name, void *data, size_t size) { int rc; #if defined(HAS_SYS_XATTR_H) || defined(HAS_ATTR_XATTR_H) SIMPLE_WRAP_UNIX(_lgetxattr(path, name, data, size), "lgetxattr(`%s', `%s', %p, %zu)", unresolved_path, name, data, size); #else return ENOSYS; #endif }
int xattr_open (Npfid *fid, Npstr *name, u64 *sizep) { Fid *f = fid->aux; assert (f->xattr == NULL); f->xattr = _xattr_create (name, 0, XATTR_FLAGS_GET, 0); if (_lgetxattr (f->xattr, path_s (f->path)) < 0) goto error; *sizep = (u64)f->xattr->len; return 0; error: _xattr_destroy (&f->xattr); return -1; }