This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
NAME_MAX and RAMFS
- From: Stephen Polkowski <stephen at centtech dot com>
- To: eocs <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 16 May 2002 15:11:43 -0500
- Subject: [ECOS] NAME_MAX and RAMFS
Hi all,
I've noticed a problem with the NAME_MAX and the RAMFS filesystem. My
problem is with the lenght of a filename. When you read directory the
name it is copied from the directory entry. The amount copied is based
on NAME_MAX which is set by _POSIX_NAME_MAX. The default is only 15
bytes (kind of small). However, the size of a filename in RAMFS is the
left over space from a ramfs_dirent. The default ramfs_dirent is 32.
The size of a RAMFS dirent is controlled by CYGNUM_RAMFS_DIRENT_SIZE,
which is user settable.
Ok, my problem is that the length of a filename is controlled in two
separate places, namely NAME_MAX and CYGNUM_RAMFS_DIRENT_SIZE. It
appears that the two different sizes aren't kept in check. Which of the
two should control the size of a filename? Shouldn't the configuration
tools keep the two values in check? What do you think?
Steve
--
Stephen Polkowski
Centaur Technology
Austin, TX
(512) 418-5730
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss