Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

statl(2)

chmod(2)

chown(2)

creat(2)

link(2)

mknod(2)

pipe(2)

read(2)

stat(2)

time(2)

unlink(2)

utime(2)

write(2)



  statl(2)                            CLIX                            statl(2)



  NAME

    statl, fstatl - Provides information about a file

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <sys/stat.h>

    #include <sys/types.h>

    int statl(
      char *path ,
      struct statl *buffer );

    int fstatl(
      int filedes ,
      struct statl *buffer );

  PARAMETERS

    path      Points to the pathname identifying the file.

    filedes   Specifies the file descriptor identifying the file.

    buffer    Points to the statl structure in which information is returned.
              The statl structure is described in the <statl.h> header file.

  DESCRIPTION

    The statl() function is a variant of the stat() function, returning
    similar information about a file.  The statl structure in which the
    information is returned differs from the stat structure filled-in by the
    stat() function only in the size of the st_ino inode number field.

    The CLIX kernel maintains a 32-bit inode number for each open file, but
    the stat structure's st_ino field is only 16 bits (sizeof(ino_t)), so only
    the low-order 16 bits are returned by the stat() function.  The statl
    structure's st_ino field is 32 bits (sizeof(ulong)), so the inode number
    is accurately returned in all cases.

    This CLIX extension function was added to support applications that depend
    upon exact reporting of the inode number for correct operation.  For
    example, an application that assumes that the same inode number will be
    returned for a given file by both the stat() and getdents() functions will
    in certain cases be incorrect, since the getdents() function returns the
    full 32-bit inode number.  Such an application should use statl() instead.




  2/94 - Intergraph Corporation                                              1






  statl(2)                            CLIX                            statl(2)



    The fstatl() function is a variant of the fstat() function which fills-in
    a statl structure rather than a stat structure.

  RETURN VALUES

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

  ERRORS

    The statl() function fails if any of the following are true:

    [ENOTDIR]
           A component of the path prefix is not a directory.

    [ENOENT]
           The named file does not exist.

    [EACCES]
           Search permission is denied for a component of the path prefix.

    [EFAULT]
           The buffer or path parameter points to an invalid address.

    [EINTR]
           A signal was caught during the statl() function.

    [ENAMETOOLONG]
           The length of the path argument exceeds PATH_MAX, or a pathname
           component is longer than NAME_MAX while POSIX_NO_TRUNC is in
           effect.

    [ENOLINK]
           The path parameter points to a remote machine and the link to that
           machine is no longer active.

    [EMULTIHOP]
           Components of path require hopping to multiple remote machines.

    The fstatl() function fails if any of the following are true:

    [EBADF]     The fildes parameter is not a valid open file descriptor.

    [EFAULT]    The buffer parameter points to an invalid address.

    [ENOLINK]   The fildes parameter points to a remote machine and the link
                to that machine is no longer active.

  RELATED INFORMATION




  2                                              Intergraph Corporation - 2/94






  statl(2)                            CLIX                            statl(2)



    Functions:  chmod(2), chown(2), creat(2), link(2), mknod(2), pipe(2),
    read(2), stat(2), time(2), unlink(2), utime(2), write(2)




















































  2/94 - Intergraph Corporation                                              3




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