[okl4-developer] Starting with graphic output
Remy Gottschalk
rgottschalk at linagora.com
Wed Apr 30 02:05:54 EST 2008
Hi Nelson,
On Tue, 2008-04-29 at 16:52 +1000, Geoffrey Lee wrote:
> On Mon, Apr 28, 2008 at 02:49:52PM +0000, Remy Gottschalk wrote:
>
> Hi Remy
>
> > So it seems that when compiled with 2.1 framework opening a file with
> > O_RDWR doesn't give writing right even if the file is opened successfully.
> > Since it behave the same on okl4 environment and on my box I'd accuse the
> > libc.
> > Since it may be a setup problem on my side could you please perform this test ?
> > Also if you got any clue about what is happening feel free to tell.
>
> I ran your program under OK Linux on QEMU and on hardware, and I got
> success for all the tests. What toolchain are you using to build
> your system, and what libc are you using?
>
I finally found out what went wrong. It was in fact a nasty include
problem.
I added in my Makefile the build/iguana/include/ dir with -I option and
that was my mistake. So build/iguana/include/fcntl.h was included in
place of the wanted fcntl.h.
I detail in build/iguana/include/fcntl.h we found :
#define O_ACCMODE 0x3
#define O_RDONLY 0x1
#define O_WRONLY 0x2
#define O_RDWR (O_RDONLY | O_WRONLY)
And in /usr/include/asm-generic/fcntl.h
#define O_ACCMODE 00000003
#define O_RDONLY 00000000
#define O_WRONLY 00000001
#define O_RDWR 00000002
So including the wrong file I got the wrong values. Now I include the
correct one and it works fine. Furthermore since in v.1.5.2 no file
named fcntl.h was in build/iguana/include the problem appeared when I
switched to v2.1.
By the way if someone know the historical reason behind O_RDWR not being
defined as (O_RDONLY | O_WRONLY) I'd be glad to hear the story :).
To come back to the initial problem, any news concerning the invalid
memory dereference at 0x18 ?
Thanks for your help and support.
--
Remy Gottschalk - rgottschalk at linagora.com
Ingénieur informatique embarquée
Groupe LINAGORA - http://www.linagora.com
Tél.: +33(0)1 58 18 68 28 - Fax : +33(0)1 58 18 68 29
More information about the Developer
mailing list