Re: [PATCH] opjitconv: Fix incorrect open() flag

Richard Purdie <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On Fri, 2014-11-07 at 09:15 -0600, Maynard Johnson wrote:
> Hi, Richard.  Good to hear from you again.

Yes, its been a while! I am still around and using oprofile :)

> On 11/07/2014 06:32 AM, Richard Purdie wrote:
> > When using compile fortification options on a mips build we saw:
> > 
> > | In file included from /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/fcntl.h:302:0,
> > |                  from opjitconv.c:25:
> > | In function 'open',
> > |     inlined from 'copy_dumpfile' at opjitconv.c:219:6:
> > | /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
> > |     __open_missing_mode ();
> > |     ^
> > | Makefile:440: recipe for target 'opjitconv.o' failed
> > 
> > Why does this only happen on mips? mips has:
> > 
> > O_CREAT = 0x100 and S_IRUSR = 0400 and these (in hex and otcal) are equivalent. 
> > Most other platforms have O_CREAT = 0100.
> > 
> > Obviously the call is simply wrong so fix it...
> Agreed that the open call is wrong, but the error is that the S_IRUSR create
> mode was specified instead of the O_RDONLY flag.  The dumpfile should *not* be created if it
> does not exist.

Makes sense, I wasn't entirely sure if this was trying to create it or
not, read permissions tended to suggest it was being created.

Do you want an updated patch or are you just going to fix it?

Cheers,

Richard


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.