aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/stat.h
diff options
context:
space:
mode:
authorJeffrey Hsu <hsu@FreeBSD.org>1996-03-11 02:15:04 +0000
committerJeffrey Hsu <hsu@FreeBSD.org>1996-03-11 02:15:04 +0000
commit1fed30f4b34b55833dbeef9218255392ff7291e3 (patch)
treee6d8c1a04d67a636a51f58b8e4e095895dae0099 /sys/sys/stat.h
parent83edfd3e32b3b3890175e18564165f699dd212ae (diff)
downloadsrc-1fed30f4b34b55833dbeef9218255392ff7291e3.tar.gz
src-1fed30f4b34b55833dbeef9218255392ff7291e3.zip
Notes
Diffstat (limited to 'sys/sys/stat.h')
-rw-r--r--sys/sys/stat.h71
1 files changed, 43 insertions, 28 deletions
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
index 99ae6b9792dc..592b84e9d915 100644
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -35,8 +35,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)stat.h 8.6 (Berkeley) 3/8/94
- * $Id: stat.h,v 1.5 1994/10/02 17:24:57 phk Exp $
+ * @(#)stat.h 8.12 (Berkeley) 6/16/95
+ * $Id: stat.h,v 1.7 1996/02/24 11:19:43 hsu Exp $
*/
#ifndef _SYS_STAT_H_
@@ -51,46 +51,57 @@
#ifndef _POSIX_SOURCE
struct ostat {
- unsigned 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 */
- unsigned short st_uid; /* user ID of the file's owner */
- unsigned short st_gid; /* group ID of the file's group */
- unsigned short st_rdev; /* device type */
- long st_size; /* file size, in bytes */
+ u_int16_t 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_int16_t st_uid; /* user ID of the file's owner */
+ u_int16_t st_gid; /* group ID of the file's group */
+ u_int16_t st_rdev; /* device type */
+ int32_t st_size; /* file size, in bytes */
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
struct timespec st_ctimespec; /* time of last file status change */
- long st_blksize; /* optimal blocksize for I/O */
- long st_blocks; /* blocks allocated for file */
- unsigned long st_flags; /* user defined flags for file */
- unsigned long st_gen; /* file generation number */
+ int32_t st_blksize; /* optimal blocksize for I/O */
+ int32_t st_blocks; /* blocks allocated for file */
+ u_int32_t st_flags; /* user defined flags for file */
+ u_int32_t st_gen; /* file generation number */
};
#endif /* !_POSIX_SOURCE */
struct stat {
- dev_t 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 */
- 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 */
+ dev_t 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 */
+ 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 */
+#ifndef _POSIX_SOURCE
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
struct timespec st_ctimespec; /* time of last file status change */
- off_t st_size; /* file size, in bytes */
- quad_t st_blocks; /* blocks allocated for file */
- unsigned long st_blksize; /* optimal blocksize for I/O */
- unsigned long st_flags; /* user defined flags for file */
- unsigned long st_gen; /* file generation number */
- long st_lspare;
- quad_t st_qspare[2];
+#else
+ time_t st_atime; /* time of last access */
+ long st_atimensec; /* nsec of last access */
+ time_t st_mtime; /* time of last data modification */
+ long st_mtimensec; /* nsec of last data modification */
+ time_t st_ctime; /* time of last file status change */
+ long st_ctimensec; /* nsec of last file status change */
+#endif
+ off_t st_size; /* file size, in bytes */
+ int64_t st_blocks; /* blocks allocated for file */
+ u_int32_t st_blksize; /* optimal blocksize for I/O */
+ u_int32_t st_flags; /* user defined flags for file */
+ u_int32_t st_gen; /* file generation number */
+ int32_t st_lspare;
+ int64_t st_qspare[2];
};
+#ifndef _POSIX_SOURCE
#define st_atime st_atimespec.ts_sec
#define st_mtime st_mtimespec.ts_sec
#define st_ctime st_ctimespec.ts_sec
+#endif
#define S_ISUID 0004000 /* set user id on execution */
#define S_ISGID 0002000 /* set group id on execution */
@@ -128,6 +139,7 @@ struct stat {
#define S_IFREG 0100000 /* regular */
#define S_IFLNK 0120000 /* symbolic link */
#define S_IFSOCK 0140000 /* socket */
+#define S_IFWHT 0160000 /* whiteout */
#define S_ISVTX 0001000 /* save swapped text even after use */
#endif
@@ -141,6 +153,7 @@ struct stat {
#define S_ISLNK(m) (((m) & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) (((m) & 0170000) == 0010000 || \
((m) & 0170000) == 0140000) /* fifo or socket */
+#define S_ISWHT(m) (((m) & 0170000) == 0160000) /* whiteout */
#endif
#ifndef _POSIX_SOURCE
@@ -161,6 +174,7 @@ struct stat {
#define UF_NODUMP 0x00000001 /* do not dump file */
#define UF_IMMUTABLE 0x00000002 /* file may not be changed */
#define UF_APPEND 0x00000004 /* writes to file may only append */
+#define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */
/*
* Super-user changeable flags.
*/
@@ -173,6 +187,7 @@ struct stat {
/*
* Shorthand abbreviations of above.
*/
+#define OPAQUE (UF_OPAQUE)
#define APPEND (UF_APPEND | SF_APPEND)
#define IMMUTABLE (UF_IMMUTABLE | SF_IMMUTABLE)
#endif