This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Overlapping #defines in isoinfra/current/include/sys/stat.h

On Tue, Jul 08, 2003 at 03:17:11PM -0700, Scott Wilkinson wrote:
> I was having a problem mounting JFFS2, which I tracked down to what I
> believe is a problem in /packages/isoinfra/current/include/sys/stat.h.  
> The problem is that the (somewhat recent) addition of:
> #define __stat_mode_LNK    (1<<8)
> #define __stat_mode_SOCK   (1<<9)
> #define S_IFMT           (S_IFDIR|S_IFCHR|S_IFBLK|S_IFREG| \
>                           S_IFIFO|S_IFLNK|S_IFSOCK)
> conflicts with the long-standing definition of:
> #define S_IRUSR  (1<<8)
> #define S_IWUSR  (1<<9)

Is suggested by Gary i moved S_I* so that it starts at bit 16. I
tested this with the ROMFS with both an old ROMFS image and a new
image. Both passed the fileio1 test. 

>From what i can see, this change will probably only break code that
uses stat to look at the S_I* flags for ROMFS built using the old
mk_romfs. I think its unlikely that anyody is actually doing this in
an embedded system. But i could be wrong....

I've broken jffs2 twice in the last month, so it would be nice if
someone checked this patch to see if this makes three!


Attachment: stat.diff
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]