CSYMLINK(2)

NAME
csymlink - make conditional symbolic link to a file

SYNOPSIS
csymlink(ucb_target, att_target, linkname)
char *ucb_target, *att_target, *linkname;

DESCRIPTION
A conditional symbolic link linkname is created to ucb_target and att_target. (Linkname is the name of the file created; the target strings are used to create the conditional symbolic link.) Any of the names may be an arbitrary path name; the files need not be on the same file system.

When a conditional symbolic link is encountered during pathname parsing, the link is treated as an ordinary symbolic link. However, the value of the link depends on the process's selected universe (U_UCB or U_ATT). If the universe is U_UCB, the value of the symbolic link is ucb_target. If the universe is U_ATT, the value of the symbolic link is att_target.

RETURN VALUE
Upon successful completion, a zero value is returned. If an error occurs, the error code is stored in errno and a -1 value is returned.

ERRORS
The conditional symbolic link is made unless one or more of the following are true:

[EPERM]
    Any of the arguments contain a character with the high-order bit set.

[ENOENT]
    One of the pathnames specified was too long.

[ENOTDIR]
    A component of the linkname prefix is not a directory.

[EEXIST]
    Linkname already exists.

[EACCES]
    A component of the linkname path prefix denies search permission.

[EROFS]
    The file linkname would reside on a read-only file system.

[EFAULT]
    Any of the parameters point outside the process's allocated address space.

[ELOOP]
    Too may symbolic links were encountered in translating the pathname.

[ENOSPC]
    The directory in which the entry for the new symbolic link is being placed cannot be extended because there is no space left on the file system containing the directory.

[ENOSPC]
    The new symbolic link cannot be created because there is no space left on the file system which will contain the link.

[ENOSPC]
    There are no free inodes on the file system on which the symbolic link is being created.

[EIO]
    An I/O error occurred while reading from or writing to the file system.

SEE ALSO
ln(1), universe(1), readclink(2), readlink(2), symlink(2), universe(2), unlink(2)