new stat structure reflecting 64-bit file sizes, 32-bit uid, gid, and dev's
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 14 May 1992 05:43:45 +0000 (21:43 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 14 May 1992 05:43:45 +0000 (21:43 -0800)
SCCS-vsn: sys/sys/stat.h 7.13

usr/src/sys/sys/stat.h

index b7e60ff..89ed0dc 100644 (file)
@@ -4,10 +4,38 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)stat.h      7.12 (Berkeley) %G%
+ *     @(#)stat.h      7.13 (Berkeley) %G%
  */
 
  */
 
+#ifdef KERNEL
+struct ostat
+#else
+#include <sys/time.h>
 struct stat
 struct stat
+#endif
+{
+       u_short st_dev;                 /* inode's device */
+       ino_t   st_ino;                 /* inode's number */
+       mode_t  st_mode;                /* inode protection mode */
+       nlink_t st_nlink;               /* number of hard links */
+       u_short st_uid;                 /* user ID of the file's owner */
+       u_short st_gid;                 /* group ID of the file's group */
+       u_short st_rdev;                /* device type */
+       long    st_size;                /* file size, in bytes */
+       struct  timeval st_atimeval;    /* time of last access */
+       struct  timeval st_mtimeval;    /* time of last data modification */
+       struct  timeval st_ctimeval;    /* time of last file status change */
+       long    st_blksize;             /* optimal blocksize for I/O */
+       long    st_blocks;              /* blocks allocated for file */
+       u_long  st_flags;               /* user defined flags for file */
+       u_long  st_gen;                 /* file generation number */
+};
+
+#ifdef KERNEL
+struct stat
+#else
+struct qstat
+#endif
 {
        dev_t   st_dev;                 /* inode's device */
        ino_t   st_ino;                 /* inode's number */
 {
        dev_t   st_dev;                 /* inode's device */
        ino_t   st_ino;                 /* inode's number */
@@ -16,18 +44,19 @@ struct stat
        uid_t   st_uid;                 /* user ID of the file's owner */
        gid_t   st_gid;                 /* group ID of the file's group */
        dev_t   st_rdev;                /* device type */
        uid_t   st_uid;                 /* user ID of the file's owner */
        gid_t   st_gid;                 /* group ID of the file's group */
        dev_t   st_rdev;                /* device type */
+       struct  timeval st_atimeval;    /* time of last access */
+       struct  timeval st_mtimeval;    /* time of last data modification */
+       struct  timeval st_ctimeval;    /* time of last file status change */
        off_t   st_size;                /* file size, in bytes */
        off_t   st_size;                /* file size, in bytes */
-       time_t  st_atime;               /* time of last access */
-       long    st_spare1;
-       time_t  st_mtime;               /* time of last data modification */
-       long    st_spare2;
-       time_t  st_ctime;               /* time of last file status change */
-       long    st_spare3;
-       long    st_blksize;             /* optimal blocksize for I/O */
-       long    st_blocks;              /* blocks allocated for file */
+       quad_t  st_blocks;              /* blocks allocated for file */
+       u_long  st_blksize;             /* optimal blocksize for I/O */
        u_long  st_flags;               /* user defined flags for file */
        u_long  st_gen;                 /* file generation number */
        u_long  st_flags;               /* user defined flags for file */
        u_long  st_gen;                 /* file generation number */
+       long    st_spare[4];
 };
 };
+#define st_atime st_atimeval.tv_sec
+#define st_mtime st_mtimeval.tv_sec
+#define st_ctime st_ctimeval.tv_sec
 
 #define        S_ISUID 0004000                 /* set user id on execution */
 #define        S_ISGID 0002000                 /* set group id on execution */
 
 #define        S_ISUID 0004000                 /* set user id on execution */
 #define        S_ISGID 0002000                 /* set group id on execution */
@@ -109,6 +138,10 @@ int        stat __P((const char *, struct stat *));
 #ifndef _POSIX_SOURCE
 int    fchmod __P((int, mode_t));
 int    lstat __P((const char *, struct stat *));
 #ifndef _POSIX_SOURCE
 int    fchmod __P((int, mode_t));
 int    lstat __P((const char *, struct stat *));
+/* temporarily */
+int    lqstat __P((const char *, struct qstat *));
+int    fqstat __P((int, struct qstat *));
+int    qstat __P((const char *, struct qstat *));
 #endif /* not POSIX */
 __END_DECLS
 #endif
 #endif /* not POSIX */
 __END_DECLS
 #endif