include/fcntl.h: remove O_RDOK/O_WROK aliases

O_RDOK and O_WROK are non-standard aliases for O_RDONLY and O_WRONLY
respectively.  Having two names for the same flag creates confusion,
especially when aligning the flag values with Linux.  Remove the
aliases and replace all uses with the standard O_RDONLY/O_WRONLY.

No functional change — O_RDOK was defined as O_RDONLY and O_WROK as
O_WRONLY, so the replacement is a pure text substitution.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2026-06-24 13:49:16 +08:00 committed by Alan C. Assis
parent 1924a96064
commit 6161c73639
39 changed files with 73 additions and 75 deletions

View file

@ -90,7 +90,7 @@ static int nxmq_verify_receive(FAR struct file *mq,
return -EINVAL;
}
if ((mq->f_oflags & O_RDOK) == 0)
if ((mq->f_oflags & O_RDONLY) == 0)
{
return -EBADF;
}

View file

@ -91,7 +91,7 @@ static int nxmq_verify_send(FAR FAR struct file *mq, FAR const char *msg,
return -EINVAL;
}
if ((mq->f_oflags & O_WROK) == 0)
if ((mq->f_oflags & O_WRONLY) == 0)
{
return -EBADF;
}

View file

@ -83,7 +83,7 @@ static void task_init_stream(FAR struct streamlist *list)
*/
stream[i].fs_cookie = (FAR void *)(intptr_t)i;
stream[i].fs_oflags = i ? O_WROK : O_RDONLY;
stream[i].fs_oflags = i ? O_WRONLY : O_RDONLY;
/* Assign custom callbacks to NULL. */