未验证 提交 bef1d557 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2244 from RT-Thread/fix_libc_posix

Fix libc posix
...@@ -170,7 +170,7 @@ static void aio_read_work(struct rt_work* work, void* work_data) ...@@ -170,7 +170,7 @@ static void aio_read_work(struct rt_work* work, void* work_data)
if (len <= 0) if (len <= 0)
cb->aio_result = errno; cb->aio_result = errno;
else else
cb->aio_result = 0; cb->aio_result = len;
rt_hw_interrupt_enable(level); rt_hw_interrupt_enable(level);
return ; return ;
...@@ -321,6 +321,7 @@ static void aio_write_work(struct rt_work* work, void* work_data) ...@@ -321,6 +321,7 @@ static void aio_write_work(struct rt_work* work, void* work_data)
return; return;
} }
/** /**
* The aio_write() function shall write aiocbp->aio_nbytes to the file associated * 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 * with aiocbp->aio_fildes from the buffer pointed to by aiocbp->aio_buf. The
......
...@@ -35,7 +35,7 @@ void *mmap(void *addr, size_t length, int prot, int flags, ...@@ -35,7 +35,7 @@ void *mmap(void *addr, size_t length, int prot, int flags,
cur = lseek(fd, 0, SEEK_SET); cur = lseek(fd, 0, SEEK_SET);
lseek(fd, offset, SEEK_SET); lseek(fd, offset, SEEK_SET);
read_bytes = read(fd, addr, length); read_bytes = read(fd, mem, length);
if (read_bytes != length) if (read_bytes != length)
{ {
if (addr == RT_NULL) if (addr == RT_NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册