This is the mail archive of the
mailing list for the eCos project.
Re: FAT FS enhancements
- From: Andrew Lunn <andrew at lunn dot ch>
- To: David Brennan <eCos at brennanhome dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Tue, 19 Oct 2004 09:57:42 +0200
- Subject: Re: FAT FS enhancements
- References: <41748E07.firstname.lastname@example.org>
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
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.
Various mode bits are also specified in POSIX
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