]> git.proxmox.com Git - ceph.git/blame - ceph/src/common/xattr.h
update sources to v12.1.0
[ceph.git] / ceph / src / common / xattr.h
CommitLineData
7c673cae
FG
1/*
2 * Ceph - scalable distributed file system
3 *
4 * Copyright (C) 2011 Stanislav Sedov <stas@FreeBSD.org>
5 *
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.
10 */
11
12#ifndef CEPH_EXTATTR_H
13#define CEPH_EXTATTR_H
14
7c673cae
FG
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20// Almost everyone defines ENOATTR, except for Linux,
21// which does #define ENOATTR ENODATA. It seems that occasionally that
22// isn't defined, though, so let's make sure.
23#ifndef ENOATTR
24# define ENOATTR ENODATA
25#endif
26
27int ceph_os_setxattr(const char *path, const char *name,
28 const void *value, size_t size);
29int ceph_os_fsetxattr(int fd, const char *name, const void *value,
30 size_t size);
31ssize_t ceph_os_getxattr(const char *path, const char *name,
32 void *value, size_t size);
33ssize_t ceph_os_fgetxattr(int fd, const char *name, void *value,
34 size_t size);
35ssize_t ceph_os_listxattr(const char *path, char *list, size_t size);
36ssize_t ceph_os_flistxattr(int fd, char *list, size_t size);
37int ceph_os_removexattr(const char *path, const char *name);
38int ceph_os_fremovexattr(int fd, const char *name);
39
40#ifdef __cplusplus
41}
42#endif
43
44#endif /* !CEPH_EXTATTR_H */