open_mode
Pattara Kiatisevi
pkiatisevi at student.ei.uni-stuttgart.de
Mon Feb 11 16:38:08 UTC 2002
Thank you and sorry. I did do the
'find ~/thesis/src/rtems-4.5.0-jg3 -name '*.h' -print | xargs grep O_WRONLY'
and got nothing but didn't aware to find it in /opt/rtems .. :-p
Anyway, the sound driver is working now. I will work on porting the Ogg
Vorbis Player to RTEMS.
Thanks all,
Pattara
The best things in life are free. - B.G. DeSilva (1927)
----------------------------------------------------------------------
Ott Pattara Kiatisevi T L W G
M.Sc. INFOTECH Student, Stuttgart, Germany http://linux.thai.net/
----------------------------------------------------------------------
On Mon, 11 Feb 2002, Eric Norum wrote:
> Pattara Kiatisevi wrote:
> >
> > 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?
> >
> > Regards,
> > Pattara
>
> I don't want to deter your initial enthusiasm for using RTEMS, but
> before posting to the mailing list you could perhaps try looking for
> yourself. This sort of thing can easily be found with a quick use of
> find/grep:
> find /opt/rtems/ -name '*.h' -print | xargs grep O_WRONLY
> /opt/rtems/m68k-rtems/include/sys/fcntl.h:#define O_ACCMODE
> (O_RDONLY|O_WRONLY|O_RDWR)
> /opt/rtems/m68k-rtems/include/sys/fcntl.h:#define O_WRONLY 1 /* +1 ==
> FWRITE */
> /opt/rtems/m68k-rtems/include/sys/fcntl.h:#define _O_WRONLY O_WRONLY
>
> So, like on any POSIX-compatible system
>
> #include <fcntl.h>
>
> is all you need to get the required declarations (since fcntl.h includes
> sys/fcntl.h), which are part of the newlib sources.
>
> --
> Eric Norum eric.norum at usask.ca
> Department of Electrical Engineering Phone: (306) 966-5394
> University of Saskatchewan FAX: (306) 966-5407
> Saskatoon, Canada.
>
>
More information about the users
mailing list