|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ T s
Length: 5714 (0x1652)
Types: TextFile
Notes: @(#)stat.h 13.5 (RC International) 91/08/28 */
Names: »stat.h«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/include/sys/stat.h«
/* @(#)stat.h 13.5 (RC International) 91/08/28 */
#ifndef _STAT_H
#define _STAT_H
#include <sys/device.h>
struct stat
{
dev_t st_dev; /* device inode is on [NOT TX] */
ino_t st_ino; /* i-number within file system */
mode_t st_mode; /* protection and partial type info */
nlink_t st_nlink; /* number of hard links */
uid_t st_uid; /* owning user id */
gid_t st_gid; /* owning group id */
dev_t st_rdev; /* device id for chr/blk inodes [NOT TX] */
off_t st_size; /* total size of file in bytes */
time_t st_atime; /* time last accessed */
time_t st_mtime; /* time last modified */
time_t st_ctime; /* time inode last modified */
long st_blksize; /* optimal block size for I/O operations */
long st_blocks; /* actual number of 1K blocks allocated */
/* TX additions */
UID_T st_UID; /* unique id of this file */
UID_T st_lvUID; /* logical volume containing this file */
union
{
UID_T std_UIDval;
struct rawdev std_rawdev;
struct rcomm std_rcomm;
struct rsubpu std_rsubpu;
short std_unit;
} st_device; /* device specific information */
u_short st_type; /* type of file (superset of S_IFMT) */
short st_puid; /* controlling server's pu id */
long st_flags; /* extended mode bits */
char st_priext; /* primary extent size = 1024 * 2 ^ st_priext */
char st_secext; /* secondary extent size */
};
#define st_UIDval st_device.std_UIDval
#define st_rawdev st_device.std_rawdev
#define st_rcomm st_device.std_rcomm
#define st_rsubpu st_device.std_rsubpu
#define st_unit st_device.std_unit
/* st_mode bits: */
#define S_IFMT 0170000 /* type of file */
#define S_IFCHR 0020000 /* character special */
#define S_IFDIR 0040000 /* directory */
#define S_IFBLK 0060000 /* block special */
#define S_IFREG 0100000 /* regular */
#define S_IFLNK 0120000 /* symbolic link */
#define S_IFSOCK 0140000 /* socket */
#define S_IFIFO 0010000 /* fifo - SYSV */
#define S_IFEXT 0170000 /* extended type (see st_type) */
#define S_ISUID 04000 /* set user id on execution */
#define S_ISGID 02000 /* set group id on execution */
#define S_ISVTX 01000 /* save swapped text even after use */
#define S_IREAD 00400 /* read permission, owner */
#define S_IWRITE 00200 /* write permission, owner */
#define S_IEXEC 00100 /* execute/search permission, owner */
#define S_IRGRP 00040 /* read permission, group */
#define S_IWGRP 00020 /* write permission, group */
#define S_IXGRP 00010 /* execute/search permission, group */
#define S_IROTH 00004 /* read permission, others */
#define S_IWOTH 00002 /* write permission, others */
#define S_IXOTH 00001 /* execute/search permission, others */
#define S_IRUSR 00400 /* read permission, owner */
#define S_IWUSR 00200 /* write permission, owner */
#define S_IXUSR 00100 /* execute/search permission, owner */
#define S_IRWXU 00700 /* read, write, execute/search, owner */
#define S_IRWXG 00070 /* read, write, execute permission by group */
#define S_IRWXO 00007 /* read, write, execute permission by others */
/* File type (st_type) values (TX) */
#define S_ITFIFO 000001 /* fifo */
#define S_ITCHR 000002 /* character special */
#define S_ITDIR 000004 /* directory */
#define S_ITBLK 000006 /* block special */
#define S_ITREG 000010 /* regular */
#define S_ITLNK 000012 /* symbolic link */
#define S_ITSOCK 000014 /* socket */
#define S_ITXXX 000017 /* above this value are TX only */
#define S_ITLV 000020 /* UID: logical volume */
#define S_ITFS 000021 /* UID: file system mount point */
#define S_ITIPC 000022 /* UID: IPC endpoint */
#define S_ITDSK 000023 /* rawdev: physical disk */
#define S_ITMT 000024 /* rawdev: magnetic tape */
#define S_ITCOMM 000025 /* rcomm: communication device */
#define S_ITCONMSG 000027 /* rawdev: console message device */
#define S_ITSUBPU 000030 /* rsubpu: sub-PU */
#define S_ITITTY 000031 /* indirect tty (for /dev/tty) */
#define S_ITERR 000033 /* error messages */
#define S_ITNULL 000034 /* null source/sink */
#define S_ITCONS 000035 /* rawdev: console */
#define S_ITPTC 000036 /* rlogin: controller (/dev/ptyp?) */
#define S_ITPTS 000037 /* rlogin: server (/dev/ttyp?) */
#define S_ITMIPC 000040 /* MXIPC endpoint */
/* Extended mode (st_flags) bits (TX) */
#define S_ISECURE 0x0001 /* prohibit ordinary UNIX writes */
#define S_IHISTORY 0x0002 /* maintain a history of data changes */
#define S_UNLOCKBLK 0x0004 /* allow unlock of S and H block locks
on O_CONTROL file before transaction
abort or commit */
#define S_ENFCMT 000010 /* enable system V record lock
enforcement mode */
#define S_ENFMT S_ISGID /* use this because no other available */
/* File type test macros (st_mode) */
#define S_ISBLK(mode) (( (mode) & S_IFMT) == S_IFBLK)
#define S_ISCHR(mode) (( (mode) & S_IFMT) == S_IFCHR)
#define S_ISDIR(mode) (( (mode) & S_IFMT) == S_IFDIR)
#define S_ISREG(mode) (( (mode) & S_IFMT) == S_IFREG)
#define S_ISFIFO(mode) (( (mode) & S_IFMT) == S_IFIFO)
#define S_ISLNK(mode) (( (mode) & S_IFMT) == S_IFLNK)
#define S_ISSOCK(mode) (( (mode) & S_IFMT) == S_IFSOCK)
#define S_ISEXT(mode) (( (mode) & S_IFMT) == S_IFEXT)
#if defined(__STDC__)
extern int fstat(int, struct stat *);
extern int stat(char *, struct stat *);
#if !defined(_POSIX_SOURCE)
extern int lstat(char *, struct stat *);
extern int mknod(char *, mode_t, dev_t);
#endif /* !defined(_POSIX_SOURCE) */
extern int chmod(char *, mode_t);
extern int mkdir(char *, mode_t);
extern int mkfifo(char *, mode_t);
extern mode_t umask(mode_t);
#else /* Not __STDC__ */
extern int fstat(), stat(), lstat(), mknod();
extern int chmod(), mkdir(), mkfifo();
extern mode_t umask();
#endif /* __STDC__ */
#endif /* _STAT_H */