summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-07-17 17:26:42 +0200
committerJeremy Allison <jra@samba.org>2012-07-17 21:22:31 +0200
commitd1a5a5bc80885270100f52ad4170987346e16ffc (patch)
tree0c49fa86644dc675652ea49a00a09a181d36a061 /source3
parent254e8c46c432ec0540181a62ad71c08dd119e380 (diff)
downloadsamba-d1a5a5bc80885270100f52ad4170987346e16ffc.tar.gz
samba-d1a5a5bc80885270100f52ad4170987346e16ffc.tar.bz2
samba-d1a5a5bc80885270100f52ad4170987346e16ffc.zip
s3-linux-aio: Fix error handling
Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 17 21:22:31 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_aio_linux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/modules/vfs_aio_linux.c b/source3/modules/vfs_aio_linux.c
index d152f35501..7b739429e4 100644
--- a/source3/modules/vfs_aio_linux.c
+++ b/source3/modules/vfs_aio_linux.c
@@ -288,11 +288,9 @@ static void aio_linux_setup_returns(struct io_event *ioev)
{
struct aio_private_data *pd = (struct aio_private_data *)ioev->data;
- /* ioev->res2 contains the -errno if error. */
- /* ioev->res contains the number of bytes sent/received. */
- if (ioev->res2) {
+ if (ioev->res < 0) {
pd->ret_size = -1;
- pd->ret_errno = -ioev->res2;
+ pd->ret_errno = -ioev->res;
} else {
pd->ret_size = ioev->res;
pd->ret_errno = 0;