From 8bcc534da4b2b29709a80327687085876b02ff5a Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 2 Feb 2010 06:51:15 +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(+) (limited to 'xlators/storage') 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)); -- cgit