raiden00pl commented on code in PR #20030:
URL: https://github.com/apache/nuttx/pull/20030#discussion_r3955399241
##########
libs/libc/aio/lio_listio.c:
##########
@@ -547,59 +580,61 @@ int lio_listio(int mode, FAR struct aiocb * const list[],
int nent,
status = OK;
switch (aiocbp->aio_lio_opcode)
{
- case LIO_NOP:
- {
- /* Mark the do-nothing operation complete */
-
- aiocbp->aio_result = OK;
- }
- break;
-
- case LIO_READ:
- case LIO_WRITE:
- {
- if (aiocbp->aio_lio_opcode == LIO_READ)
- {
- /* Submit the asynchronous read operation */
-
- status = aio_read(aiocbp);
- }
- else
- {
- /* Submit the asynchronous write operation */
-
- status = aio_write(aiocbp);
- }
-
- if (status < 0)
- {
- /* Failed to queue the I/O. Set up the error return. */
-
- errcode = get_errno();
- ferr("ERROR: aio_read/write failed: %d\n", errcode);
- DEBUGASSERT(errcode > 0);
- aiocbp->aio_result = -errcode;
- ret = ERROR;
- }
- else
- {
- /* Increment the count of successfully queue operations */
-
- nqueued++;
- }
- }
- break;
-
- default:
- {
- /* Make the invalid operation complete with an error */
-
- ferr("ERROR: Unrecognized opcode: %d\n",
- aiocbp->aio_lio_opcode);
- aiocbp->aio_result = -EINVAL;
- ret = ERROR;
- }
- break;
+ case LIO_NOP:
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]