public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] file stat mode bits and compatibility
@ 2009-10-10 13:54 Rutger Hofman
  2009-10-19 11:04 ` Ross Younger
  0 siblings, 1 reply; 2+ messages in thread
From: Rutger Hofman @ 2009-10-10 13:54 UTC (permalink / raw)
  To: eCos Discuss List

I wanted to share a YAFFS file system between my eCos application and my 
u-boot bootloader. Well, since the NAND flash implementations eCos has 
YAFFS, and u-boot has it too. I ran into a problem when sharing a YAFFS 
file system. The single incompatibility issue is the value of file stat 
mode bits. E.g., u-boot has S_IRUSR = S_IREAD = (1<<8) but eCos has 
(1<<16). Now, this incompatibility will not only bite me, but anyone who 
wants to share a YAFFS file system between RedBoot and Linux or whatever 
combination of systems. There seems to be no hook in YAFFS to disable 
the permissions altogether.

POSIX does not appear to prescribe values for these bits 
(http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html), 
so an implementation appears free to choose them. A short investigation 
showed that Linux, Solaris, and M$ Visual C++ all have chosen the same 
values as u-boot, which makes eCos the odd one out.

Just changing the eCos mode bit definitions will render existing file 
systems unusable. So, this proposal: introduce a .cdl option 
CYGBLD_ISO_STAT_MODE_COMPATIBILITY in isoinfra.cdl which, when enabled, 
has the mode bit definitions like Linux, u-boot, and the rest; and when 
disabled (as by default?), has the old situation.

Enabling this stat mode compatibility made the YAFFS file system fully 
accessible between u-boot and eCos.

What is the opinion of the list?

If people agree, shall I submit a patch to the ecos-patches list?

Rutger Hofman
VU Amsterdam

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-19 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-10 13:54 [ECOS] file stat mode bits and compatibility Rutger Hofman
2009-10-19 11:04 ` Ross Younger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).