소스 검색

[libc] Fix the result length issue in aio_read_work.

Bernard Xiong 6 년 전
부모
커밋
75061a2712
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      components/libc/aio/posix_aio.c

+ 2 - 1
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