Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/fhlink.2
Show All 19 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" 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. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd September 23, 2020 | .Dd February 23, 2021 | ||||
.Dt FHLINK 2 | .Dt FHLINK 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm fhlink , | .Nm fhlink , | ||||
.Nm fhlinkat | .Nm fhlinkat | ||||
.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 52 Lines • ▼ Show 20 Lines | |||||
.Fa to | .Fa to | ||||
is a relative paths. | is a relative paths. | ||||
In this case a relative path | In this case a relative path | ||||
.Fa to | .Fa to | ||||
is interpreted relative to | is interpreted relative to | ||||
the directory associated with the file descriptor | the directory associated with the file descriptor | ||||
.Fa tofd | .Fa tofd | ||||
instead of the current working directory. | instead of the current working directory. | ||||
.Pp | |||||
Values for | |||||
.Fa flag | |||||
are constructed by a bitwise-inclusive OR of flags from the following | |||||
list, defined in | |||||
.In fcntl.h : | |||||
.Bl -tag -width indent | |||||
.It Dv AT_SYMLINK_FOLLOW | |||||
If | |||||
.Fa fhp | |||||
names a symbolic link, a new link for the target of the symbolic link is | |||||
created. | |||||
.It Dv AT_BENEATH | |||||
Only allow to link to a file which is beneath of the topping directory. | |||||
See the description of the | |||||
.Dv O_BENEATH | |||||
flag in the | |||||
.Xr open 2 | |||||
manual page. | |||||
.It Dv AT_RESOLVE_BENEATH | |||||
Only walks paths below the topping directory. | |||||
See the description of the | |||||
.Dv O_RESOLVE_BENEATH | |||||
flag in the | |||||
.Xr open 2 | |||||
manual page. | |||||
.El | |||||
.Pp | .Pp | ||||
If | If | ||||
kib: fhlink does not take flags. | |||||
.Fn fhlinkat | .Fn fhlinkat | ||||
is passed the special value | is passed the special value | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
in the | in the | ||||
.Fa tofd | .Fa tofd | ||||
parameter, the current working directory is used for the | parameter, the current working directory is used for the | ||||
.Fa to | .Fa to | ||||
argument. | argument. | ||||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |
fhlink does not take flags.