open() options: pass file options 0 if only ioctl is used
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
470174260c
commit
214dbe51b4
@ -59,7 +59,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
int fd;
|
int fd;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
fd = open(CONFIG_EXAMPLES_PCA9635_DEVNAME, O_WRONLY);
|
fd = open(CONFIG_EXAMPLES_PCA9635_DEVNAME, 0);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "ERROR: Failed to open %s: %d\n",
|
fprintf(stderr, "ERROR: Failed to open %s: %d\n",
|
||||||
|
@ -335,7 +335,7 @@ static void cfgdatacmd_set(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Now open the /dev/config file and set the config item */
|
/* 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 */
|
/* Display error */
|
||||||
|
|
||||||
@ -402,7 +402,7 @@ static void cfgdatacmd_unset(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Try to open the /dev/config file */
|
/* 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 */
|
/* Display error */
|
||||||
|
|
||||||
@ -549,7 +549,7 @@ static void cfgdatacmd_show_all_config_items(void)
|
|||||||
|
|
||||||
/* Try to open the /dev/config file */
|
/* 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 */
|
/* Display error */
|
||||||
|
|
||||||
@ -658,7 +658,7 @@ static void cfgdatacmd_format(void)
|
|||||||
|
|
||||||
/* Try to open the /dev/config file */
|
/* 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 */
|
/* Display error */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user