diff --git a/examples/pca9635/pca9635_main.c b/examples/pca9635/pca9635_main.c index 7fd00ddcb..bf17c9168 100644 --- a/examples/pca9635/pca9635_main.c +++ b/examples/pca9635/pca9635_main.c @@ -59,7 +59,7 @@ int main(int argc, FAR char *argv[]) int fd; int ret; - fd = open(CONFIG_EXAMPLES_PCA9635_DEVNAME, O_WRONLY); + fd = open(CONFIG_EXAMPLES_PCA9635_DEVNAME, 0); if (fd < 0) { fprintf(stderr, "ERROR: Failed to open %s: %d\n", diff --git a/system/cfgdata/cfgdata_main.c b/system/cfgdata/cfgdata_main.c index af601b16b..c589b5743 100644 --- a/system/cfgdata/cfgdata_main.c +++ b/system/cfgdata/cfgdata_main.c @@ -335,7 +335,7 @@ static void cfgdatacmd_set(int argc, char *argv[]) /* Now open the /dev/config file and set the config item */ - if ((fd = open(g_config_dev, O_WRONLY)) < 2) + if ((fd = open(g_config_dev, 0)) < 2) { /* Display error */ @@ -402,7 +402,7 @@ static void cfgdatacmd_unset(int argc, char *argv[]) /* Try to open the /dev/config file */ - if ((fd = open(g_config_dev, O_WRONLY)) < 2) + if ((fd = open(g_config_dev, 0)) < 2) { /* Display error */ @@ -549,7 +549,7 @@ static void cfgdatacmd_show_all_config_items(void) /* Try to open the /dev/config file */ - if ((fd = open(g_config_dev, O_RDONLY)) < 2) + if ((fd = open(g_config_dev, 0)) < 2) { /* Display error */ @@ -658,7 +658,7 @@ static void cfgdatacmd_format(void) /* Try to open the /dev/config file */ - if ((fd = open(g_config_dev, O_WRONLY)) < 2) + if ((fd = open(g_config_dev, 0)) < 2) { /* Display error */