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

@ -39,10 +39,8 @@
/* open flag settings for open() (and related APIs) */
#define O_RDONLY (1 << 0) /* Open for read access (only) */
#define O_RDOK O_RDONLY /* Read access is permitted (non-standard) */
#define O_WRONLY (1 << 1) /* Open for write access (only) */
#define O_WROK O_WRONLY /* Write access is permitted (non-standard) */
#define O_RDWR (O_RDOK|O_WROK) /* Open for both read & write access */
#define O_RDWR (3 << 0) /* Open for both read & write access */
#define O_CREAT (1 << 2) /* Create file/sem/mq object */
#define O_EXCL (1 << 3) /* Name must not exist when opened */
#define O_APPEND (1 << 4) /* Keep contents, append to end */