aio: change aio_fildes int type

if fdcheck enabled, protected fd used to aio_fildes will overflow.
Change to int and also follow posix spec:
https://pubs.opengroup.org/onlinepubs/7908799/xsh/aio.h.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
fangxinyong 2023-09-05 22:51:09 +08:00 committed by Petro Karashchenko
parent e43194f5ea
commit 79004411b4
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ struct aiocb
FAR volatile void *aio_buf; /* Location of buffer */ FAR volatile void *aio_buf; /* Location of buffer */
off_t aio_offset; /* File offset */ off_t aio_offset; /* File offset */
size_t aio_nbytes; /* Length of transfer */ size_t aio_nbytes; /* Length of transfer */
int16_t aio_fildes; /* File descriptor (should be int) */ int aio_fildes; /* File descriptor */
int8_t aio_reqprio; /* Request priority offset (not used, should be int) */ int8_t aio_reqprio; /* Request priority offset (not used, should be int) */
uint8_t aio_lio_opcode; /* Operation to be performed (should be int) */ uint8_t aio_lio_opcode; /* Operation to be performed (should be int) */