Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/stat.2
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
names a symbolic link, the status of the symbolic link is returned. | names a symbolic link, the status of the symbolic link is returned. | ||||
.It Dv AT_RESOLVE_BENEATH | .It Dv AT_RESOLVE_BENEATH | ||||
Only walk paths below the starting directory. | Only walk paths below the starting directory. | ||||
See the description of the | See the description of the | ||||
.Dv O_RESOLVE_BENEATH | .Dv O_RESOLVE_BENEATH | ||||
flag in the | flag in the | ||||
.Xr open 2 | .Xr open 2 | ||||
manual page. | manual page. | ||||
.It Dv AT_EMPTY_PATH | |||||
If the specified | |||||
.Fa path | |||||
argument is empty, return the information about a file referenced | |||||
by the descriptor | |||||
.Fa fd . | |||||
The referenced file does not need to be a directory in this case. | |||||
emaste: My take:
If the path argument is an empty string, operate on the file or directory referenced… | |||||
If | |||||
.Fa fd | |||||
value is | |||||
.Dv AT_FDCWD , | |||||
Done Inline ActionsSome mention of the required privileges seems useful. markj: Some mention of the required privileges seems useful. | |||||
Done Inline ActionsThere is no required privilege for fstat(). For linkat() I will mention PRIV_VFS_FHOPEN kib: There is no required privilege for fstat(). For linkat() I will mention PRIV_VFS_FHOPEN | |||||
then the function returns status of the current directory. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
If | If | ||||
.Fn fstatat | .Fn fstatat | ||||
is passed the special value | is passed the special value | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
in the | in the | ||||
.Fa fd | .Fa fd | ||||
▲ Show 20 Lines • Show All 360 Lines • Show Last 20 Lines |
My take:
If the path argument is an empty string, operate on the file or directory referenced by the descriptor fd. If fd is equal to AT_FDCWD, operate on the current working directory.
"operate on" could be "return information about" if that's more clear.
To me it seems that "file or directory referenced..." is sufficiently clear that the "does not need to be a directory" sentence could be omitted, but I'm not certain - you could also leave it.