Ralf Corsepius corsepiu at
Mon Feb 11 14:55:21 UTC 2002

Am Mon, 2002-02-11 um 15.15 schrieb Pattara Kiatisevi:
> Thank you for fast response. At first, I did use the O_WRONLY flag but I
> couldn't find the definition of O_WRONLY anywhere in the RTEMS source
> (hmm, maybe I missed it somehow) so I happened to see
> #define LIBIO_FLAGS_WRITE         0x0004  /* writing */
> in the libio.h so I tried directly the value of "4" :-p
> So it works now (with O_WRONLY) but I have to define it manually in my
> application code (#define O_WRONLY 1). A better way is possible?

>From Linux's man 2 open:

       #include <sys/types.h>
       #include <sys/stat.h>
       #include <fcntl.h>

       int open(const char *pathname, int flags);
       int open(const char *pathname, int flags, mode_t mode);
       int creat(const char *pathname, mode_t mode);

You probably want to include some of the includes.


More information about the users mailing list