diff options
| author | Bernard Xiong <[email protected]> | 2019-01-21 17:18:48 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2019-01-21 17:18:48 +0800 |
| commit | 75061a2712e2cfb02c274b246d70991d0de6a9b5 (patch) | |
| tree | 9ab3d78f7271a82bc8c0c408909f9c57f11b335f /components/libc | |
| parent | 99bef01983d9e74e6a261df0ff0feadc41e8e8ad (diff) | |
[libc] Fix the result length issue in aio_read_work.
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/aio/posix_aio.c | 3 |
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 |
