Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/link.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)link.2 8.3 (Berkeley) 1/12/94 | .\" @(#)link.2 8.3 (Berkeley) 1/12/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd February 23, 2021 | .Dd March 30, 2021 | ||||
.Dt LINK 2 | .Dt LINK 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm link , | .Nm link , | ||||
.Nm linkat | .Nm linkat | ||||
.Nd make a hard file link | .Nd make a hard file link | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
.Bl -tag -width indent | .Bl -tag -width indent | ||||
.It Dv AT_SYMLINK_FOLLOW | .It Dv AT_SYMLINK_FOLLOW | ||||
If | If | ||||
.Fa name1 | .Fa name1 | ||||
names a symbolic link, a new link for the target of the symbolic link is | names a symbolic link, a new link for the target of the symbolic link is | ||||
created. | created. | ||||
.It Dv AT_RESOLVE_BENEATH | .It Dv AT_RESOLVE_BENEATH | ||||
Only walk paths below the directory specified by the | Only walk paths below the directory specified by the | ||||
.Ar fd | .Ar fd1 | ||||
markj: I guess this should be `fd1`. | |||||
descriptor. | descriptor. | ||||
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 | |||||
.Fa path2 | |||||
Done Inline Actionsname2? markj: `name2`? | |||||
argument is an empty string, link the file referenced by the descriptor | |||||
.Fa fd2 . | |||||
Done Inline ActionsI believe it should be fd2. markj: I believe it should be `fd2`. | |||||
Done Inline ActionsEh, sorry it should be name1 and fd1. I misunderstood the interface the first time I read this. markj: Eh, sorry it should be `name1` and `fd1`. I misunderstood the interface the first time I read… | |||||
The operation requires that the calling process has the | |||||
.Dv PRIV_VFS_FHOPEN | |||||
privilege, effectively being executed with effective user | |||||
.Dv root . | |||||
.El | .El | ||||
.Pp | .Pp | ||||
If | If | ||||
.Fn linkat | .Fn linkat | ||||
is passed the special value | is passed the special value | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
in the | in the | ||||
.Fa fd1 | .Fa fd1 | ||||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |
I guess this should be fd1.