]>
git.proxmox.com Git - ceph.git/blob - ceph/src/common/xattr.h
2 * Ceph - scalable distributed file system
4 * Copyright (C) 2011 Stanislav Sedov <stas@FreeBSD.org>
6 * This is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2.1, as published by the Free Software
9 * Foundation. See file COPYING.
12 #ifndef CEPH_EXTATTR_H
13 #define CEPH_EXTATTR_H
15 #include <sys/types.h>
22 // Almost everyone defines ENOATTR, except for Linux,
23 // which does #define ENOATTR ENODATA. It seems that occasionally that
24 // isn't defined, though, so let's make sure.
26 # define ENOATTR ENODATA
29 int ceph_os_setxattr(const char *path
, const char *name
,
30 const void *value
, size_t size
);
31 int ceph_os_fsetxattr(int fd
, const char *name
, const void *value
,
33 ssize_t
ceph_os_getxattr(const char *path
, const char *name
,
34 void *value
, size_t size
);
35 ssize_t
ceph_os_fgetxattr(int fd
, const char *name
, void *value
,
37 ssize_t
ceph_os_listxattr(const char *path
, char *list
, size_t size
);
38 ssize_t
ceph_os_flistxattr(int fd
, char *list
, size_t size
);
39 int ceph_os_removexattr(const char *path
, const char *name
);
40 int ceph_os_fremovexattr(int fd
, const char *name
);
46 #endif /* !CEPH_EXTATTR_H */