Annotation of 43BSDReno/lib/libc/sys/link.2, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1980 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)link.2      6.3 (Berkeley) 8/26/85
                      6: .\"
                      7: .TH LINK 2 "August 26, 1985"
                      8: .UC 4
                      9: .SH NAME
                     10: link \- make a hard link to a file
                     11: .SH SYNOPSIS
                     12: .nf
                     13: .ft B
                     14: link(name1, name2)
                     15: char *name1, *name2;
                     16: .fi
                     17: .ft R
                     18: .SH DESCRIPTION
                     19: A hard link
                     20: to
                     21: .I name1
                     22: is created;
                     23: the link has the name
                     24: .IR name2 .
                     25: .I Name1
                     26: must exist.
                     27: .PP
                     28: With hard links,
                     29: both
                     30: .I name1
                     31: and
                     32: .I name2
                     33: must be in the same file system.
                     34: Unless the caller is the super-user,
                     35: .I name1
                     36: must not be a directory.
                     37: Both the old and the new
                     38: .I link
                     39: share equal access and rights to
                     40: the underlying object.
                     41: .SH "RETURN VALUE
                     42: Upon successful completion, a value of 0 is returned.  Otherwise,
                     43: a value of \-1 is returned and
                     44: .I errno
                     45: is set to indicate the error.
                     46: .SH "ERRORS
                     47: .I Link
                     48: will fail and no link will be created if one or more of the following
                     49: are true:
                     50: .TP 15
                     51: [ENOTDIR]
                     52: A component of either path prefix is not a directory.
                     53: .TP 15
                     54: [EINVAL]
                     55: Either pathname contains a character with the high-order bit set.
                     56: .TP 15
                     57: [ENAMETOOLONG]
                     58: A component of either pathname exceeded 255 characters,
                     59: or entire length of either path name exceeded 1023 characters.
                     60: .TP 15
                     61: [ENOENT]
                     62: A component of either path prefix does not exist.
                     63: .TP 15
                     64: [EACCES]
                     65: A component of either path prefix denies search permission.
                     66: .TP 15
                     67: [EACCES]
                     68: The requested link requires writing in a directory with a mode
                     69: that denies write permission.
                     70: .TP 15
                     71: [ELOOP]
                     72: Too many symbolic links were encountered in translating one of the pathnames.
                     73: .TP 15
                     74: [ENOENT]
                     75: The file named by \fIname1\fP does not exist.
                     76: .TP 15
                     77: [EEXIST]
                     78: The link named by \fIname2\fP does exist.
                     79: .TP 15
                     80: [EPERM]
                     81: The file named by \fIname1\fP is a directory and the effective
                     82: user ID is not super-user.
                     83: .TP 15
                     84: [EXDEV]
                     85: The link named by \fIname2\fP and the file named by \fIname1\fP
                     86: are on different file systems.
                     87: .TP 15
                     88: [ENOSPC]
                     89: The directory in which the entry for the new link is being placed
                     90: cannot be extended because there is no space left on the file
                     91: system containing the directory.
                     92: .TP 15
                     93: [EDQUOT]
                     94: The directory in which the entry for the new link
                     95: is being placed cannot be extended because the
                     96: user's quota of disk blocks on the file system
                     97: containing the directory has been exhausted.
                     98: .TP 15
                     99: [EIO]
                    100: An I/O error occurred while reading from or writing to 
                    101: the file system to make the directory entry.
                    102: .TP 15
                    103: [EROFS]
                    104: The requested link requires writing in a directory on a read-only file
                    105: system.
                    106: .TP 15
                    107: [EFAULT]
                    108: One of the pathnames specified
                    109: is outside the process's allocated address space.
                    110: .SH "SEE ALSO"
                    111: symlink(2), unlink(2)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.