From 289cf378909279c0e523b25754420bd2c2c31323 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 2 Feb 2010 07:29:06 +0000 Subject: storage/posix: Set op_ret to -1 when open fails. Thanks to Jeff Darcy for the bug report and the patch. Signed-off-by: Vikas Gorur Signed-off-by: Anand V. Avati BUG: 581 (posix_open does not report open(2) failures correctly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=581 --- xlators/storage/posix/src/posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 340d71bcb..ead1779bc 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)); -- cgit