diff options
author | Vikas Gorur <vikas@gluster.com> | 2010-02-02 06:51:15 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-02-02 04:51:48 -0800 |
commit | 8bcc534da4b2b29709a80327687085876b02ff5a (patch) | |
tree | c5ad5a9fc604fc1a0887b8c43dac166e565dd76c /xlators/storage/posix/src/posix.c | |
parent | 902422d4de87b5db099cf084025120cc980fabbd (diff) |
storage/posix: Set op_ret to -1 when open fails.
Thanks to Jeff Darcy <jdarcy@redhat.com> for
the bug report and the patch.
Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 581 (posix_open does not report open(2) failures correctly)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=581
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 8374f408cc2..eb1387a72da 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -2343,6 +2343,7 @@ posix_open (call_frame_t *frame, xlator_t *this, _fd = open (real_path, flags, 0); if (_fd == -1) { + op_ret = -1; op_errno = errno; gf_log (this->name, GF_LOG_ERROR, "open on %s: %s", real_path, strerror (op_errno)); |