From d01487e9b8bc056adf611201a6a3b8f48c7af7f8 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 26 Aug 2009 05:32:09 +0000 Subject: libglusterfsclient: return -1 with errno set to ENOSYS for apis which are not implemented. Signed-off-by: Anand V. Avati BUG: 229 (For apis which are not implemented return correct values with errno set appropriately) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=229 --- libglusterfsclient/src/libglusterfsclient.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'libglusterfsclient/src/libglusterfsclient.c') diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index d2f9a3dc2..6a4e137cf 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -3216,7 +3216,8 @@ glusterfs_listxattr (glusterfs_handle_t handle, char *list, size_t size) { - return ENOSYS; + errno = ENOSYS; + return -1; } ssize_t @@ -3225,7 +3226,8 @@ glusterfs_llistxattr (glusterfs_handle_t handle, char *list, size_t size) { - return ENOSYS; + errno = ENOSYS; + return -1; } ssize_t @@ -3233,7 +3235,8 @@ glusterfs_flistxattr (glusterfs_file_t fd, char *list, size_t size) { - return ENOSYS; + errno = ENOSYS; + return -1; } int @@ -3241,7 +3244,8 @@ glusterfs_removexattr (glusterfs_handle_t handle, const char *path, const char *name) { - return ENOSYS; + errno = ENOSYS; + return -1; } int @@ -3249,14 +3253,16 @@ glusterfs_lremovexattr (glusterfs_handle_t handle, const char *path, const char *name) { - return ENOSYS; + errno = ENOSYS; + return -1; } int glusterfs_fremovexattr (glusterfs_file_t fd, const char *name) { - return ENOSYS; + errno = ENOSYS; + return -1; } int32_t -- cgit