Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ readlink(2) — SunOS 4.0.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

symlink(2)

READLINK(2)  —  SYSTEM CALLS

NAME

readlink − read value of a symbolic link

SYNOPSIS

int readlink(path, buf, bufsiz)
char ∗path, ∗buf;
int bufsiz;

DESCRIPTION

readlink() places the contents of the symbolic link referred to by path in the buffer buf which has size bufsiz. The contents of the link are not null terminated when returned.

RETURN VALUE

The call returns the count of characters placed in the buffer if it succeeds, or a −1 if an error occurs, placing the error code in the global variable errno. 

ERRORS

readlink() will fail and the buffer will be unchanged if:

ENAMETOOLONG The length of a component of path exceeds 255 characters, or the length of path exceeds 1023 characters. 

ENOENT The named file does not exist. 

EACCES Search permission is denied for a component of the path prefix of path.

ELOOP Too many symbolic links were encountered in translating path.

EINVAL The named file is not a symbolic link. 

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

EFAULT path or buf extends outside the process’s allocated address space. 

SEE ALSO

stat(2), symlink(2)

Sun Release 4.0  —  Last change: 22 November 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026