summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-05-12 19:10:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-13 12:12:08 -0700
commit2a0398dee8521704b90d3f1776a5e380bf8ac5b3 (patch)
tree394a62736967be4cfec9314e8fdc9cce54ebcd25 /xlators/storage
parent9bdda4ce0aaebb3f8109152f056d9b35229fb708 (diff)
added features/mac-compat
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 800 (Problem on OSX with NFS and CIFS exports) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=800
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 677aa0270da..22e9fcecb23 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3025,7 +3025,7 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
{
struct posix_private *priv = NULL;
int32_t op_ret = -1;
- int32_t op_errno = ENOENT;
+ int32_t op_errno = 0;
int32_t list_offset = 0;
size_t size = 0;
size_t remaining_size = 0;
@@ -3134,8 +3134,11 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
}
op_ret = sys_lgetxattr (real_path, key, value, op_ret);
- if (op_ret == -1)
+ if (op_ret == -1) {
+ op_errno = errno;
+
break;
+ }
value [op_ret] = '\0';
if (strcmp (key, gen_key) != 0)