svn commit: samba r16004 - in branches/SAMBA_4_0/source/ntvfs/posix: .

metze at samba.org metze at samba.org
Fri Jun 2 14:06:30 GMT 2006


Author: metze
Date: 2006-06-02 14:06:30 +0000 (Fri, 02 Jun 2006)
New Revision: 16004

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16004

Log:
- move #ifdef outof the real functions
- hopefully all build-farm hosts have ENOTSUP...

metze
Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c	2006-06-02 12:51:42 UTC (rev 16003)
+++ branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c	2006-06-02 14:06:30 UTC (rev 16004)
@@ -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 @@
 				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 @@
 	blob->length = ret;
 
 	return NT_STATUS_OK;
-#else
-	return NT_STATUS_NOT_SUPPORTED;
-#endif
 }
 
 /*
@@ -81,7 +116,6 @@
 				int fd, 
 				const DATA_BLOB *blob)
 {
-#if HAVE_XATTR_SUPPORT
 	int ret;
 
 	if (fd != -1) {
@@ -94,9 +128,6 @@
 	}
 
 	return NT_STATUS_OK;
-#else
-	return NT_STATUS_NOT_SUPPORTED;
-#endif
 }
 
 
@@ -106,7 +137,6 @@
 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 @@
 	}
 
 	return NT_STATUS_OK;
-#else
-	return NT_STATUS_NOT_SUPPORTED;
-#endif
 }
 
 /*



More information about the samba-cvs mailing list