From: card@masi.ibp.fr (Remy CARD) Subject: Re: Problems with extfs (a way to find the max file name length) Date: 3 Aug 1992 07:47:33 GMT
In article <1992Aug2.214421.469@cco.caltech.edu> hzatz@cco.caltech.edu (Harold R. Zatz) writes:
>
> Actually, if all you're looking for is the maximum valid filename
>length in a particular file system, why not just write a simple routine
>that writes out a test file with an extremely large (>256) filename,
>and then see how long a filename you can read back in?
>
> This works on my regular and msdos partitions; I don't have an
>extfs partition to check it for. It does also work on my Apollo DN-10000
>at work, though.
>
[Program deleted]
To know the *real* max path name and max file name, I think that
one should rely on the Posix pathconf() function. Currently, pathconf() is
implemented as a library routine but it should be moved to a system call
to be able to return values that are fs dependent. When, I have enough
time - first I have to modify ext fs to use the new super block structure
and the new buffer cache management from linux 0.97 - and if Linus agrees,
I will implement pathconf()/fpathconf() as system calls. Until these calls
are implemented, suffice to know that the max file name in ext fs is 255
(it's sufficient I hope).
>
> --Harold
>--
>"Twas brillig and the slithy toves I'm Harold R. Zatz, a.k.a. "H".
>Did gyre and gimble in the wabe; Internet: hzatz@graphics.cornell.edu
>All mimsy were the borogoves, USmail: 232 Linden Ave. Apt. #2
>And the mome raths, outgrabe..." Ithaca, NY 14850
Remy