This is an automated email from the ASF dual-hosted git repository.
simbit18 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new d172f81ec apps: Replace O_RDOK with O_RDONLY after alias removal
d172f81ec is described below
commit d172f81eccd24475850e66204cb60af2164dc04d
Author: Xiang Xiao <[email protected]>
AuthorDate: Mon Jun 29 09:53:20 2026 +0800
apps: Replace O_RDOK with O_RDONLY after alias removal
The O_RDOK/O_WROK aliases have been removed from fcntl.h. Replace
all remaining O_RDOK usage with O_RDONLY in the apps repository.
Signed-off-by: Xiang Xiao <[email protected]>
---
examples/userfs/userfs_main.c | 2 +-
system/usbmsc/usbmsc_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/userfs/userfs_main.c b/examples/userfs/userfs_main.c
index 0a6b89cee..d1d64fa80 100644
--- a/examples/userfs/userfs_main.c
+++ b/examples/userfs/userfs_main.c
@@ -245,7 +245,7 @@ static int ufstest_open(FAR void *volinfo, FAR const char
*relpath,
file->inuse = 0;
}
- if ((oflags & (O_WROK | O_APPEND)) == (O_WROK | O_APPEND))
+ if ((oflags & (O_WRONLY | O_APPEND)) == (O_WRONLY | O_APPEND))
{
opriv->pos = file->inuse;
}
diff --git a/system/usbmsc/usbmsc_main.c b/system/usbmsc/usbmsc_main.c
index 3cddcc230..e625e003b 100644
--- a/system/usbmsc/usbmsc_main.c
+++ b/system/usbmsc/usbmsc_main.c
@@ -581,7 +581,7 @@ int main(int argc, FAR char *argv[])
num_luns, luns[num_luns].path);
ret = usbmsc_bindlun(handle, luns[num_luns].path, 0, 0, 0,
- luns[num_luns].flags & O_WROK ? false : true);
+ luns[num_luns].flags & O_WRONLY ? false : true);
if (ret < 0)
{
printf("mcsonn_main: usbmsc_bindlun failed for LUN %d using %s: "