Skip to content

include/fcntl.h: remove O_RDOK/O_WROK aliases#19231

Merged
acassis merged 1 commit into
apache:masterfrom
xiaoxiang781216:upstream-rdok-nuttx
Jun 28, 2026
Merged

include/fcntl.h: remove O_RDOK/O_WROK aliases#19231
acassis merged 1 commit into
apache:masterfrom
xiaoxiang781216:upstream-rdok-nuttx

Conversation

@xiaoxiang781216

@xiaoxiang781216 xiaoxiang781216 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

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. This PR removes the aliases from include/fcntl.h and replaces all in-tree uses with the standard O_RDONLY/O_WRONLY.

Impact

No functional change. O_RDOK was defined as O_RDONLY and O_WROK as O_WRONLY, so the replacement is a pure text substitution that preserves existing behavior while using the standard POSIX flag names.

A companion change for the apps repository (replacing the remaining O_RDOK usages there) is submitted separately as apache/nuttx-apps#3566.

Testing

  • tools/checkpatch.sh -c -u -m -g (commit mode, same as CI) passes with no errors.
  • git grep 'O_RDOK\|O_WROK' confirms no remaining references in the tree.
  • Builds cleanly on affected configs.

Note

need merge apache/nuttx-apps#3566 first

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>
@github-actions github-actions Bot added Area: Drivers Drivers issues Size: M The size of the change in this PR is medium labels Jun 28, 2026
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@acassis acassis merged commit 6161c73 into apache:master Jun 28, 2026
17 of 53 checks passed
@simbit18

simbit18 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Hi @xiaoxiang781216 @acassis, This PR was merged too quickly; there are many broken jobs.

https://github.com/apache/nuttx/actions/runs/28309022972

@acassis

acassis commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

@simbit18 you are right, I thought since apache/nuttx-apps#3566 was merged it was safe to merge this change, but seems like it was not!

@xiaoxiang781216 xiaoxiang781216 deleted the upstream-rdok-nuttx branch June 29, 2026 01:58
@xiaoxiang781216

Copy link
Copy Markdown
Contributor Author

@simbit18 you are right, I thought since apache/nuttx-apps#3566 was merged it was safe to merge this change, but seems like it was not!

fix here: ci error is fixed by apache/nuttx-apps#3568. @simbit18 @acassis .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Drivers Drivers issues Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants