This is the mail archive of the ecos-patches@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 enhancements


On Mon, Oct 18, 2004 at 08:46:15PM -0700, David Brennan wrote:
> This patch includes the changes to add a fssync function, chmod 
> capabilities, and honor read only flag.  The chmod and honor attributes 
> are configurable with a single CDL parameter. The fssync is not 
> configurable.

There are a number of things i don't like about this patch. 

chmod is part of POSIX. As such, it should stick to the POSIX standard
as much as possible. 

http://www.opengroup.org/onlinepubs/009695399/functions/chmod.html

Various mode bits are also specified in POSIX

http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html

I would prefer that chmod() uses standard POSIX symantics. ie if you
want a file to be read only, you remove the write bits. If a file on
the filesystem is read only, stat() would return a mode with the write
bits reset. If the "file" is a directory is should set S_IFDIR.

Some of the FATFS attributes don't fit with POSIX. For hidden, system
and archive i would add a fatfs specific FS_INFO_ATTRIB_FATFS key
which could be used to set these attributes using setinfo() and
calling getinfo() with the key would return the state of these
attributes plus the volume attribute. Read only and directory is not
needed here since you can get those using standard POSIX calls.

fssync is not POSIX. I cannot find a POSIX equivelent system
call. POSIX only has sync() which synchronises all filesystems.  So i
suggest you rename this something like cyg_fs_fssync(), or you
implement sync().

        Thanks
                Andrew


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