diff options
author | Vikas Gorur <vikas@gluster.com> | 2010-02-02 07:29:06 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-02-06 08:44:13 -0800 |
commit | 289cf378909279c0e523b25754420bd2c2c31323 (patch) | |
tree | e1a31b7240753000f9b7921331f349e8674305e2 | |
parent | 2d85ef645f3048419d905cfc9da10a28885a6775 (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
-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 340d71bcbf2..ead1779bcb8 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -1842,6 +1842,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)); |