This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch releases/13.0 in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 98631ad7a5965842536ab03ed58bab24320fcfe2 Author: Xiang Xiao <[email protected]> AuthorDate: Thu Jun 25 03:23:52 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/configdata/configdata_main.c | 2 +- nshlib/nsh_script.c | 2 +- platform/mikroe-stm32f4/mikroe_configdata.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/configdata/configdata_main.c b/examples/configdata/configdata_main.c index 3218569f6..007a9d162 100644 --- a/examples/configdata/configdata_main.c +++ b/examples/configdata/configdata_main.c @@ -664,7 +664,7 @@ int main(int argc, FAR char *argv[]) /* Open the /dev/config device */ - g_fd = open("/dev/config", O_RDOK); + g_fd = open("/dev/config", O_RDONLY); if (g_fd == -1) { printf("ERROR: Failed to open /dev/config %d\n", -errno); diff --git a/nshlib/nsh_script.c b/nshlib/nsh_script.c index d1f1d369e..20114efc0 100644 --- a/nshlib/nsh_script.c +++ b/nshlib/nsh_script.c @@ -121,7 +121,7 @@ int nsh_script(FAR struct nsh_vtbl_s *vtbl, FAR const FAR char *cmd, /* Open the file containing the script */ - vtbl->np.np_fd = open(fullpath, O_RDOK | O_CLOEXEC); + vtbl->np.np_fd = open(fullpath, O_RDONLY | O_CLOEXEC); if (vtbl->np.np_fd < 0) { if (log) diff --git a/platform/mikroe-stm32f4/mikroe_configdata.c b/platform/mikroe-stm32f4/mikroe_configdata.c index d65e695c7..ab786c625 100644 --- a/platform/mikroe-stm32f4/mikroe_configdata.c +++ b/platform/mikroe-stm32f4/mikroe_configdata.c @@ -86,7 +86,7 @@ int platform_setconfig(enum config_data_e id, int instance, /* Try to open the /dev/config device file */ - if ((fd = open("/dev/config", O_RDOK)) == -1) + if ((fd = open("/dev/config", O_RDONLY)) == -1) { /* Error opening the config device */ @@ -209,7 +209,7 @@ int platform_getconfig(enum config_data_e id, int instance, /* Try to open the /dev/config device file */ - if ((fd = open("/dev/config", O_RDOK)) == -1) + if ((fd = open("/dev/config", O_RDONLY)) == -1) { /* Error opening the config device */
