Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

symlink



GETLOCAL(2,L)               AIX Technical Reference               GETLOCAL(2,L)



-------------------------------------------------------------------------------
getlocal, setlocal



PURPOSE

Manages the <LOCAL> alias.

SYNTAX

int getlocal(localname, maxlength)
char *localname;
int maxlength;

int setlocal(localname)
char *localname;

DESCRIPTION

The getlocal system call returns the calling process's alias for <LOCAL>.  The
alias path name is returned in the localname buffer.  The setlocal system call
sets the value of the current <LOCAL> alias.

The <LOCAL> alias is evaluated whenever the system encounters a symbolic link
beginning with the string <LOCAL>.  At that point, it substitutes the alias
path name for <LOCAL> in the path name and continues path name interpretation
normally.  If the alias has a leading '/', then the name evaluation starts from
the root directory, otherwise the directory containing the symbolic link is
used to further evaluate the new name (identical to the semantics of ordinary
symbolic links).

RETURN VALUE

Upon successful completion, a value of 0 is returned to the calling process.
Otherwise, a value of -1 is returned and errno is set to indicate the error.

RESULTS

The getlocal system call fails if any of the following are true:

EINVAL    The alias name is longer than maxlength (the length of the localname
          buffer).

EFAULT    localname is not a region inside the user's address space.

The setlocal system call fails if any of the following are true:

ENOTDIR   A component of the path is not a directory.

ENOENT    The path name given does not exist.




Processed November 7, 1990       GETLOCAL(2,L)                                1





GETLOCAL(2,L)               AIX Technical Reference               GETLOCAL(2,L)



ENOENT    A null path name was provided.

ENOENT    A hidden directory was named, but no component inside it matched the
          process's current site path list.

ENOENT    A symbolic link was named, but the file to which it refers does not
          exist.

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

EFAULT    path points outside the process's allocated address space.

EFAULT    The name pointed at by localname is too long (current limit is 30
          characters).

If the Transparent Computing Facility is installed on your system, getlocal can
also fail if one or more of the following are true:

ESITEDN1  path cannot be accessed because a site went down.

ESITEDN2  The operation was terminated because a site failed.

ENOSTORE  path is a name relative to the working directory, but no site which
          stores this directory is currently up.

ENOSTORE  A component of path is replicated but not stored on any site which is
          currently up.

RELATED INFORMATION

In this book:  "symlink."
























Processed November 7, 1990       GETLOCAL(2,L)                                2



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