ssize_t fgetxattr (int fd, const char *name, void *value, size_t size) { error_t err; err = HURD_DPORT_USE (fd, _hurd_xattr_get (port, name, value, &size)); return err ? __hurd_dfail (fd, err) : size; }
ssize_t lgetxattr (const char *path, const char *name, void *value, size_t size) { error_t err; file_t port = __file_name_lookup (path, O_NOLINK, 0); if (port == MACH_PORT_NULL) return -1; err = _hurd_xattr_get (port, name, value, &size); __mach_port_deallocate (__mach_task_self (), port); return err ? __hurd_fail (err) : size; }