Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lstat(2) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2)

chown(2)

creat(2)

fchmod(2)

fchown(2)

fstat(2)

link(2)

mknod(2)

pipe(2)

read(2)

stat(2)

time(2)

unlink(2)

utime(2)

utimes(2)

write(2)

stat(5)



lstat(2)                         DG/UX 5.4.2                        lstat(2)


NAME
       lstat - get file status

SYNOPSIS
       #include <sys/types.h>
       #include <sys/stat.h>

       int   lstat (path, bufferptr)
       char * path;
       struct stat * bufferptr;

   where:
       path           Address of a pathname

       bufferptr     Address of a stat buffer to fill

DESCRIPTION
       Lstat returns the current attributes of the symbolic link or file
       named by the pathname pointed to by path into the stat buffer at the
       location specified by bufferptr.  lstat is equivalent to stat except
       that it will return the file attributes of a symbolic link, instead
       of the file attributes of the target of the symbolic link.

       The interpretation of the file's attributes depend on the file's type
       [see stat(5) for details].  The subject file must be of type
       `ordinary-disk-file', `directory', `control point directory', `block-
       special-file', `character-special-file', `fifo-special-file', or
       `symbolic-link'.

       If lstat fails, the contents of the stat buffer are undefined.

ACCESS CONTROL
       Read, write, or execute permission of the named file is not required,
       but the process must have permission to resolve path.

RETURN VALUE
       0      The lstat operation was successful.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EFAULT         Statusbuffer points to an invalid address.

       ENOENT         The file the pathname resolved to does not exist.

       ENOENT         A non-terminal component of the pathname does not
                      exist.

       ENOTDIR        A non-terminal component of the pathname was not a
                      directory or symbolic link.

       ENAMETOOLONG   The pathname exceeds the length limit for pathnames.



Licensed material--property of copyright holder(s)                         1




lstat(2)                         DG/UX 5.4.2                        lstat(2)


       ENAMETOOLONG   A component of the pathname exceeds the length limit
                      for filenames.

       ENOMEM         There are not enough system resources to resolve the
                      pathname or to expand a symbolic link.

       ELOOP          The number of symbolic links encountered during
                      pathname resolution exceeded MAXSYMLINKS.  A symbolic
                      link cycle is suspected.

       EPERM          The pathname contains a character not in the allowed
                      character set.

       EFAULT         The pathname does not completely reside in the
                      process's address space or the pathname does not
                      terminate in the process's address space.

SEE ALSO
       chmod(2), chown(2), creat(2), dgmstat(2), fchmod(2), fchown(2),
       fstat(2), link(2), mknod(2), pipe(2), read(2), stat(2), time(2),
       unlink(2), utime(2), utimes(2), write(2), stat(5).




































Licensed material--property of copyright holder(s)                         2


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