Sync with CSRG.

This commit is contained in:
mycroft 1994-12-14 11:43:27 +00:00
parent 271a90d5c0
commit 43051b1cc6
1 changed files with 31 additions and 29 deletions

View File

@ -1,5 +1,3 @@
/* $NetBSD: stat.h,v 1.13 1994/06/30 08:05:54 cgd Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
* The Regents of the University of California. All rights reserved.
@ -37,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)stat.h 8.6 (Berkeley) 3/8/94
* @(#)stat.h 8.9 (Berkeley) 8/17/94
*/
#ifndef _SYS_STAT_H_
@ -47,42 +45,42 @@
#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 */
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];
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];
};
#define st_atime st_atimespec.ts_sec
#define st_mtime st_mtimespec.ts_sec
@ -124,6 +122,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
@ -137,6 +136,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
@ -157,6 +157,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.
*/
@ -169,6 +170,7 @@ struct stat {
/*
* Shorthand abbreviations of above.
*/
#define OPAQUE (UF_OPAQUE)
#define APPEND (UF_APPEND | SF_APPEND)
#define IMMUTABLE (UF_IMMUTABLE | SF_IMMUTABLE)
#endif