summaryrefslogtreecommitdiff
path: root/components/libc/aio
diff options
context:
space:
mode:
authorxph <[email protected]>2020-04-09 16:35:28 +0800
committerGitHub <[email protected]>2020-04-09 16:35:28 +0800
commitca7f01d79b3e0a997c771cec298e4ebd65b75809 (patch)
tree3d2c48aae7203b14038ba7b98b500b5343ed7f2a /components/libc/aio
parentf763f8e7284b0492c5a65ad0abf94ee1963d7dcc (diff)
parentbaa3145bfe61b3330b6a160523cc5470fa5db3a7 (diff)
Merge pull request #1 from RT-Thread/master
sync rtt
Diffstat (limited to 'components/libc/aio')
-rw-r--r--components/libc/aio/posix_aio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/libc/aio/posix_aio.c b/components/libc/aio/posix_aio.c
index 75e7de9ce3..3eb7634495 100644
--- a/components/libc/aio/posix_aio.c
+++ b/components/libc/aio/posix_aio.c
@@ -170,7 +170,7 @@ static void aio_read_work(struct rt_work* work, void* work_data)
if (len <= 0)
cb->aio_result = errno;
else
- cb->aio_result = 0;
+ cb->aio_result = len;
rt_hw_interrupt_enable(level);
return ;
@@ -321,6 +321,7 @@ static void aio_write_work(struct rt_work* work, void* work_data)
return;
}
+
/**
* The aio_write() function shall write aiocbp->aio_nbytes to the file associated
* with aiocbp->aio_fildes from the buffer pointed to by aiocbp->aio_buf. The