summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-02 14:06:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:48 -0500
commitf6a3c29ede4482bdad7362bc990fe567c5714163 (patch)
treeeee2fdde3620f2209314969b377af9e82a620375 /source4
parentc62d1d21ab0f3ff34c1c695ff2132b5a9ff25eaa (diff)
downloadsamba-f6a3c29ede4482bdad7362bc990fe567c5714163.tar.gz
samba-f6a3c29ede4482bdad7362bc990fe567c5714163.tar.bz2
samba-f6a3c29ede4482bdad7362bc990fe567c5714163.zip
r16004: - move #ifdef outof the real functions
- hopefully all build-farm hosts have ENOTSUP... metze (This used to be commit 62c64f1ddc71436aab6a2f3f2ecc3e6dcb752db9)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/xattr_system.c51
1 files changed, 39 insertions, 12 deletions
diff --git a/source4/ntvfs/posix/xattr_system.c b/source4/ntvfs/posix/xattr_system.c
index 4101b69ed7..757ccefe11 100644
--- a/source4/ntvfs/posix/xattr_system.c
+++ b/source4/ntvfs/posix/xattr_system.c
@@ -23,6 +23,45 @@
#include "includes.h"
#include "vfs_posix.h"
+#if !defined(HAVE_XATTR_SUPPORT)
+static ssize_t _none_fgetxattr(int fd, const char *name, void *value, size_t size)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+static ssize_t _none_getxattr(const char *path, const char *name, void *value, size_t size)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+static ssize_t _none_fsetxattr(int fd, const char *name, void *value, size_t size, int flags)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+static ssize_t _none_setxattr(const char *path, const char *name, void *value, size_t size, int flags)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+static ssize_t _none_fremovexattr(int fd, const char *name)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+static ssize_t _none_removexattr(const char *path, const char *name)
+{
+ errno = ENOTSUP;
+ return -1;
+}
+#define fgetxattr _none_fgetxattr
+#define getxattr _none_getxattr
+#define fsetxattr _none_fsetxattr
+#define setxattr _none_setxattr
+#define fremovexattr _none_fremovexattr
+#define removexattr _none_removexattr
+#endif
+
/*
pull a xattr as a blob, from either a file or a file descriptor
*/
@@ -34,7 +73,6 @@ NTSTATUS pull_xattr_blob_system(struct pvfs_state *pvfs,
size_t estimated_size,
DATA_BLOB *blob)
{
-#if HAVE_XATTR_SUPPORT
int ret;
*blob = data_blob_talloc(mem_ctx, NULL, estimated_size+16);
@@ -67,9 +105,6 @@ again:
blob->length = ret;
return NT_STATUS_OK;
-#else
- return NT_STATUS_NOT_SUPPORTED;
-#endif
}
/*
@@ -81,7 +116,6 @@ NTSTATUS push_xattr_blob_system(struct pvfs_state *pvfs,
int fd,
const DATA_BLOB *blob)
{
-#if HAVE_XATTR_SUPPORT
int ret;
if (fd != -1) {
@@ -94,9 +128,6 @@ NTSTATUS push_xattr_blob_system(struct pvfs_state *pvfs,
}
return NT_STATUS_OK;
-#else
- return NT_STATUS_NOT_SUPPORTED;
-#endif
}
@@ -106,7 +137,6 @@ NTSTATUS push_xattr_blob_system(struct pvfs_state *pvfs,
NTSTATUS delete_xattr_system(struct pvfs_state *pvfs, const char *attr_name,
const char *fname, int fd)
{
-#if HAVE_XATTR_SUPPORT
int ret;
if (fd != -1) {
@@ -119,9 +149,6 @@ NTSTATUS delete_xattr_system(struct pvfs_state *pvfs, const char *attr_name,
}
return NT_STATUS_OK;
-#else
- return NT_STATUS_NOT_SUPPORTED;
-#endif
}
/*