stat(4) (XENIX Compatibility Package) stat(4)
NAME
stat - data returned by stat system call
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
DESCRIPTION
The system calls stat, lstat and fstat return data in a stat
structure, which is defined in stat.h for the M88000 family of
processors reference platform:
struct stat
{
devt stdev;
lang stpad1[3];
inot stino;
modet stmode;
nlinkt stnlink;
uidt stuid;
gidt stgid;
devt strdev;
lang stpad2[2];
offt stsize;
lang stpad3;
timestructt statime;
timestructt stmtime;
timestructt stctime;
lang stblksize;
lang stblocks;
char stfstype [STFSTYPSZ];
mang stpad4[8];
};
The constants used in the stmode field are also defined in this
file:
#define SIFMT 0xF000 /* type of file */
#define SIAMB 0x1FF /* access mode bits */
#define SIFIFO 0x1000 /* fifo */
#define SIFCHR 0x2000 /* character special */
#define SIFDIR 0x4000 /* directory */
#define SIFNAM 0x5000 /* XENIX special named file */
#define SINSEM 0x1 /* XENIX semaphore subtype of IFNAM */
#define SINSMD 0x2 /* XENIX shared data subtype of IFNAM */
#define SIFBLK 0x6000 /* block special */
#define SIFREG 0x8000 /* regular */
#define SIFLNK 0xA000 /* symbolic link */
#define SSFSOCK 0xC000 /* Socket*/
#define SISUID 0x800 /* set user id on execution */
#define SISGID 0x400 /* set group id on execution */
#define SISVTX 0x200 /* save swapped text even after use */
#define SIREAD 00400 /* read permission, owner */
7/91 Page 1
stat(4) (XENIX Compatibility Package) stat(4)
#define SIWRITE 00200 /* write permission, owner */
#define SIEXEC 00100 /* execute/search permission, owner */
#define SENFMT SISGID /* record locking enforcement flag */
#define SIRWXU 00700 /* read, write, execute: owner */
#define SIRUSR 00400 /* read permission: owner */
#define SIWUSR 00200 /* write permission: owner */
#define SIXUSR 00100 /* execute permission: owner */
#define SIRWXG 00070 /* read, write, execute: group */
#define SIRGRP 00040 /* read permission: group */
#define SIWGRP 00020 /* write permission: group */
#define SIXGRP 00010 /* execute permission: group */
#define SIRWXO 00007 /* read, write, execute: other */
#define SIROTH 00004 /* read permission: other */
#define SIWOTH 00002 /* write permission: other */
#define SIXOTH 00001 /* execute permission: other */
SEE ALSO
stat(2), types(5).
Page 2 7/91