mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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 <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
a2b1cc16da
commit
4c560ef0a2
3 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue