Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dg_stat(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2)

chown(2)

creat(2)

dg_fstat(2)

dg_mstat(2)

fchmod(2)

fchown(2)

fstat(2)

link(2)

lstat(2)

mknod(2)

pipe(2)

read(2)

stat(2)

time(2)

unlink(2)

utime(2)

utimes(2)

write(2)

dg_stat(5)

stat(5)



     dgstat(2)                 DG/UX 4.30                  dgstat(2)



     NAME
          dg_stat - Get extended file status information.

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

          int        dg_stat  (path, buffer_ptr, link_intent, version)
          char *                  path;
          struct dg_stat *        buffer_ptr;
          int                     link_intent;
          unsigned short          version;

     PARAMETERS
          path           Address of a pathname.


          buffer_ptr     Address of a dg_stat buffer to fill.


          link_intent    Instructions on what to do if the component
                         of <path> is a symbolic link.


          version        Version of the struct dg_stat packet that
                         <buffer_ptr> refers to; should be set to
                         DG_STAT_VERSION_NUMBER.

     DESCRIPTION
          Dg_stat() returns the current extended attributes of the
          file named by <path> into the dg_stat buffer at the location
          specified by <buffer_ptr>.  If <path> refers to a symbolic
          link and <link_intent> is DG_STAT_FOLLOW_SYMLINK, then file
          status for the target of the symbolic link is returned.  If
          <path> refers to a symbolic link and <link_intent> is
          DG_STAT_EXAMINE_SYMLINK, then file status for the symbolic
          link itself is returned.  If <path> does not refer to a
          symbolic link, then the value of <link_intent> is
          irrelevant, but it must be one of the aforementioned
          constants.  If dg_stat() fails, the contents of the buffer
          are undefined.

          The size and composition of the structure referred to by
          <buffer_ptr> is determined by the <version> parameter.  All
          calls to this function should use DG_STAT_VERSION_NUMBER for
          this parameter.  <Version> allows for future revisions of
          struct dg_stat to be handled in a compatible way.

          The interpretation of the file's attributes depends on the
          file's type (see dg_stat(5) and stat(5)).

     ACCESS CONTROL



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





     dgstat(2)                 DG/UX 4.30                  dgstat(2)



          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 dg_stat operation was successful.


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

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


          EINVAL         <version> is not a supported version of
                         struct dg_stat.


          EINVAL         <link_intent> is not one of
                         DG_STAT_EXAMINE_SYMLINK or
                         DG_STAT_FOLLOW_SYMLINK.


          EFAULT         <buffer_ptr> 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.


          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.





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





     dgstat(2)                 DG/UX 4.30                  dgstat(2)



          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.


          EACCES         The calling process does not have permission
                         to resolve the pathname.

     SEE ALSO
          The related manual sections:  chmod(2), chown(2), creat(2),
          dg_fstat(2), dg_mstat(2), fchmod(2), fchown(2), fstat(2),
          link(2), lstat(2), mknod(2), pipe(2), read(2), stat(2),
          time(2), unlink(2), utime(2), utimes(2), write(2),
          dg_stat(5), stat(5).






























     Licensed material--property of copyright holder(s)         Page 3



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