[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: openat/fstatat functions implementation
On Sep,Thursday 17 2009, at 7:43 PM, Peter Seebach wrote:
In message <200909171730.NAA02427%Sparkle.Rodents-Montreal.ORG@localhost>, der
As Thor said, the names suck; fstatat sounds like an -at version of
fstat, which it isn't. (Thor's implicit suggestion of following the
paradigm implicit in fchroot won't work, though; that would lead to
fopen and fstat, each of which already exists with other semantics.)
Just to be picky:
There is already an fstatat in the wild:
fstatat - get file status relative to a directory file
int fstatat(int dirfd, const char *path, struct stat *buf, int
The fstatat() system call operates in exactly the same way as
except for the differences described in this manual page.
If the pathname given in path is relative, then it is
tive to the directory referred to by the file descriptor
than relative to the current working directory of the calling
as is done by stat(2) for a relative pathname).
If the pathname given in path is relative and dirfd is
value AT_FDCWD, then path is interpreted relative to the
ing directory of the calling process (like stat(2)).
They are the same. fstatat implemented by my patch does exactly same
as written above.
Main Index |
Thread Index |