Skip to content

Commit 75061a2

Browse files
committed
[libc] Fix the result length issue in aio_read_work.
1 parent 99bef01 commit 75061a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/libc/aio/posix_aio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static void aio_read_work(struct rt_work* work, void* work_data)
170170
if (len <= 0)
171171
cb->aio_result = errno;
172172
else
173-
cb->aio_result = 0;
173+
cb->aio_result = len;
174174
rt_hw_interrupt_enable(level);
175175

176176
return ;
@@ -321,6 +321,7 @@ static void aio_write_work(struct rt_work* work, void* work_data)
321321

322322
return;
323323
}
324+
324325
/**
325326
* The aio_write() function shall write aiocbp->aio_nbytes to the file associated
326327
* with aiocbp->aio_fildes from the buffer pointed to by aiocbp->aio_buf. The

0 commit comments

Comments
 (0)