*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> vattr (9)              
Title
Content
Arch
Section
 

VATTR(9)

Contents


NAME    [Toc]    [Back]

     vattr, vattr_null, VATTR_NULL - vnode attributes

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/vnode.h>

     void
     vattr_null(struct vattr *vap);

     void
     VATTR_NULL(struct vattr *vap);

DESCRIPTION    [Toc]    [Back]

     Vnode attributes describe attributes of a file or directory including
     file permissions, owner, group, size, access time and modication time.

     A vnode attribute has the following structure:

     struct vattr {
             enum vtype      va_type;        /* vnode type (for create) */
             mode_t          va_mode;        /* files access mode and type */
             nlink_t         va_nlink;       /* number of references to file */
             uid_t           va_uid;         /* owner user id */
             gid_t           va_gid;         /* owner group id */
             long            va_fsid;        /* file system id (dev for now) */
             long            va_fileid;      /* file id */
             u_quad_t        va_size;        /* file size in bytes */
             long            va_blocksize;   /* blocksize preferred for i/o */
             struct timespec va_atime;       /* time of last access */
             struct timespec va_mtime;       /* time of last modification */
             struct timespec va_ctime;       /* time file changed */
             u_long          va_gen;         /* generation number of file */
             u_long          va_flags;       /* flags defined for file */
             dev_t           va_rdev;        /* device the special file represents */
             u_quad_t        va_bytes;       /* bytes of disk space held by file */
             u_quad_t        va_filerev;     /* file modification number */
             u_int           va_vaflags;     /* operations flags, see below */
             long            va_spare;       /* remain quad aligned */
     };

     A field value of VNOVAL represents a field whose value is unavailable or
     which is not to be changed.  Valid flag values for va_flags are:

           VA_UTIMES_NULL  utimes argument was NULL
           VA_EXCLUSIVE    exclusive create request

     Vnode attributes for a file are set by the vnode operation
     VOP_SETATTR(9).  Vnode attributes for a file are retrieved by the vnode
     operation VOP_GETATTR(9).  For more information on vnode operations see
     vnodeops(9).

FUNCTIONS    [Toc]    [Back]

     vattr_null(vap)
              Set vnode attributes in vap to VNOVAL.

     VATTR_NULL(vap)
              This function is an alias for vattr_null().

CODE REFERENCES    [Toc]    [Back]

     This section describes places within the NetBSD source tree where actual
     code implementing or utilising the vnode attributes can be found.  All
     pathnames are relative to /usr/src.

     The vnode attributes ares implemented within the file
     sys/kern/vfs_subr.c.

SEE ALSO    [Toc]    [Back]

      
      
     intro(9), vfs(9), vnode(9), vnodeops(9)

BSD                            October 21, 2001                            BSD
[ Back ]
 Similar pages
Name OS Title
getnewvnode FreeBSD get a new vnode
getnewvnode OpenBSD get a new vnode
VOP_MKDIR NetBSD vnode operations
VOP_RENAME NetBSD vnode operations
VOP_LINK NetBSD vnode operations
VOP_REMOVE NetBSD vnode operations
VOP_SEEK NetBSD vnode operations
VOP_RMDIR NetBSD vnode operations
VOP_SYMLINK NetBSD vnode operations
VOP_READDIR NetBSD vnode operations
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service