diff --git a/examples/configdata/configdata_main.c b/examples/configdata/configdata_main.c index 3218569f69b..007a9d1620a 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 d1f1d369eff..20114efc05e 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 d65e695c771..ab786c62532 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 */