Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ readlink(2) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lstat(2)

stat(2)

symlink(2)



READLINK(2-SVR4)    RISC/os Reference Manual     READLINK(2-SVR4)



NAME
     readlink - read the value of a symbolic link

SYNOPSIS
     #include <unistd.h>

     int readlink(const char *path, void *buf, sizet 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.

     readlink fails and the buffer remains unchanged if:

     EACCES              Search permission is denied for a com-
                         ponent of the path prefix of path.

     EFAULT              path or buf extends outside the allo-
                         cated address space of the process.

     EINVAL              The named file is not a symbolic link.

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

     ELOOP               Too many symbolic links are encountered
                         in translating path.

     ENAMETOOLONG        The length of the path argument exceeds
                         {PATH_MAX}, or the length of a path com-
                         ponent exceeds {NAME_MAX} while
                         _POSIX_NO_TRUNC is in effect.

     ENOENT              The named file does not exist.

     ENOSYS              The file system does not support sym-
                         bolic links.

DIAGNOSTICS
     Upon successful completion readlink returns the number of
     characters placed in the buffer; otherwise, it returns -1
     and places an error code in errno.

SEE ALSO
     lstat(2), stat(2), symlink(2)









                        Printed 11/19/92                   Page 1



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