mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
fs/aio: Fix one additional place where the errno variable is being accessed inappropriately.
This commit is contained in:
+6
-9
@@ -128,19 +128,16 @@ static void aio_read_worker(FAR void *arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set the result of the read */
|
/* Set the result of the read operation. */
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_FS_ERROR
|
||||||
if (nread < 0)
|
if (nread < 0)
|
||||||
{
|
{
|
||||||
int errcode = get_errno();
|
ferr("ERROR: read failed: %d\n", (int)nread);
|
||||||
ferr("ERROR: pread failed: %d\n", errcode);
|
|
||||||
DEBUGASSERT(errcode > 0);
|
|
||||||
aiocbp->aio_result = -errcode;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aiocbp->aio_result = nread;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
aiocbp->aio_result = nread;
|
||||||
|
|
||||||
/* Signal the client */
|
/* Signal the client */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user