This is the mail archive of the ecos-discuss@sources.redhat.com 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: FAT FS questions


On Sun, Oct 03, 2004 at 03:08:42PM -0700, David Brennan wrote:
> The application we are in the process of porting to eCos has the 
> capability of "attrib +R", making files read-only. (We require booting 
> into DOS to turn off the read-only bit if that is necessary.) We could 
> not find a mechanism in eCos for this. We were looking into adding it, 
> when we decided we should first check and see if the FAT FS even honored 
> the read only attribute. Low and behold it does not. Was this 
> deliberately left out? For now we have added checking in all of our 
> application code to verify that a file is writable first. I don't have 
> any practical experience in any of the other file systems supported by 
> eCos to know if this is "normal". But I would think that most people 
> would assume a read-only file, is read-only. We use the attribute to 
> protect configuration files which we upload to our target.

RAMFS has no concept of attributes at all.

ROMFS is naturaly a read only filesystem and no attributes at all

JFFS2 has attributes as you would expect for a *nix style FS, but the
eCos layer above it i think totally ignores them.

There is no chmod() function, so even where there are attribute
support in the filesystem there is no way to change them. 

When you start look at attributes it gets complicated very
quickly. There is no concept of a user in eCos, or groups. Deeply
embedded systems have no needs for users. But without users who is a
super user who is allowed to change permission of files, ignore what
is read only? Also which write bit is important, the owner, group,
other? So the basic model is that everything runs as root and can do
what ever it wants. KISS.

Now you could submit your patches and see if Savin Zlobec is
interested in them. I suggest you make this new code configurable from
CDL though.

        Andrew

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


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