From: card@masi.ibp.fr (Remy CARD) Subject: Re: Problems with extfs (a way to find the max file name length) Date: 4 Aug 1992 07:32:52 GMT
In article <1992Aug4.011341.19167@serval.net.wsu.edu> hlu@phys1.physics.wsu.edu (Hongjiu Lu) writes:
>pathconf()/fpathconf() should not be sys call. But they should call a
>sys call to get *real* max path name and max file name. Can we put it in
>stat()/fstat()?
Well, I don't see anything preventing pathconf()/fpathconf() to
be system calls. In SunOS 4.1.1, at least, they are system calls (but in
Ultrix 4.1, they seem to be library functions).
I think that using stat()/fstat() would lead to add several fields
to the stat structure (and again break the stat() system call - this would
create a new_new_stat ;-) and we would only make stat() do the stat *and*
the pathconf system call. So, I think that it is worth moving pathconf()
and fpathconf() to system calls. Of course, I can make a mistake and it is
perhaps very easy to keep pathconf()/fpathconf() as library functions and
to use other system calls to retrieve the fs dependent informations
(_PC_LINK_MAX, _PC_NAME_MAX, _PC_PATH_MAX, _PC_CHOWN_RESTRICTED,
_PC_NO_TRUNC).
Comments are welcome,
>
>--
>H.J.
>Gcc/libc maintainer for Linux.