mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
libs/libc/aio: fix aio_fsync compatible issue
1. make the aio_fsync implementation can pass the ltp/open_posix_testsuite/aio_fsync testcases 2. the modification are referred to https://pubs.opengroup.org/onlinepubs/9699919799/functions/aio_fsync.html Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
+6
-1
@@ -191,7 +191,12 @@ int aio_fsync(int op, FAR struct aiocb *aiocbp)
|
|||||||
FAR struct aio_container_s *aioc;
|
FAR struct aio_container_s *aioc;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
DEBUGASSERT(op == O_SYNC); /* || op == O_DSYNC */
|
if (op != O_SYNC)
|
||||||
|
{
|
||||||
|
set_errno(EINVAL);
|
||||||
|
return ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
DEBUGASSERT(aiocbp);
|
DEBUGASSERT(aiocbp);
|
||||||
|
|
||||||
/* The result -EINPROGRESS means that the transfer has not yet completed */
|
/* The result -EINPROGRESS means that the transfer has not yet completed */
|
||||||
|
|||||||
Reference in New Issue
Block a user