[ECOS] chmod (crops up on YAFFS)

Rutger Hofman rutger@cs.vu.nl
Sun Nov 16 14:41:00 GMT 2008

Good afternoon list,

I am making good progress with YAFFS on top of the eCos NAND Flash 
library; I can mkdir/rmdir, opendir/readdir, rename, open/creat/unlink, 
read/write files, and walk the directory tree on my NAND flash chip.

Now, one thing I am unhappy about is file/directory permissions. YAFFS 
has permissions (user/group/other a la POSIX), but eCos has no chmod() 
call. In old exchanges on this list I saw this crop up on FAT, but FAT's 
attributes are different from (POSIX) file permissions. Some guru back 
then advised an implementation of chmod() that calls cyg_fs_setinfo() 
with a FS_INFO_CHMOD tag. But this route was not taken: I see no chmod() 

Would it be a good idea that I add chmod() to file.cxx/fileio.h that 
does take the above route, and implement it by having it call 
cyg_fs_setinfo() with a tag FS_INFO_CHMOD? My guess is that this 
shouldn't break the other filesystems, they would return an error code 
on an unknown tag FS_INFO_CHMOD.

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

More information about the Ecos-discuss mailing list