symlink

OS/161 Reference Manual

Name

symlink - create symbolic link

Library

Standard C Library (libc, -lc)

Synopsis

#include <unistd.h>

int
symlink(const char *oldname, const char *linkname);

Description

symlink creates a symbolic link. The symlink itself is named linkname, and it points to oldname.

oldname need not exist or be on the same filesystem.

Return Values

On success, symlink returns 0. On error, -1 is returned, and errno is set according to the error encountered.

Errors

The following error codes should be returned under the conditions given. Other error codes may be returned for other errors not mentioned here.
  
ENODEV The device prefix of filename did not exist.
ENOTDIR A non-final component of linkname was not a directory.
ENOENT A non-final component of linkname did not exist.
EEXIST linkname already exists.
ENOSPC The filesystem that was to hold the link is full.
EIO A hard I/O error occurred.
EFAULT linkname or oldname was an invalid pointer.