1: /*	inode.h	4.10	82/02/27	*/
   2: 
   3: /*
   4:  * The I node is the focus of all file activity in UNIX.
   5:  * There is a unique inode allocated for each active file,
   6:  * each current directory, each mounted-on file, text file, and the root.
   7:  * An inode is 'named' by its dev/inumber pair. (iget/iget.c)
   8:  * Data, from mode on, is read in from permanent inode on volume.
   9:  */
  10: #define NADDR   13
  11: 
  12: struct inode {
  13:     char    i_flag;
  14:     char    i_count;    /* reference count */
  15:     dev_t   i_dev;      /* device where inode resides */
  16:     ino_t   i_number;   /* i number, 1-to-1 with device address */
  17: /* begin read from disk */
  18:     u_short i_mode;
  19:     short   i_nlink;    /* directory entries */
  20:     short   i_uid;      /* owner */
  21:     short   i_gid;      /* group of owner */
  22:     off_t   i_size;     /* size of file */
  23:     union {
  24:         struct i_f {
  25:             daddr_t if_addr[NADDR]; /* if normal file/directory */
  26:             daddr_t if_lastr;   /* last read (read-ahead) */
  27:         } i_f;
  28:         struct i_d {
  29:             daddr_t id_rdev;    /* i_addr[0] */
  30:         } i_d;
  31:         struct i_s {
  32:             struct  socket *is_socket;
  33:         } i_s;
  34: #define i_addr      i_f.if_addr
  35: #define i_lastr     i_f.if_lastr
  36: #define i_rdev      i_d.id_rdev
  37: #define i_socket    i_s.is_socket
  38:     } i_un;
  39: /* end read from disk */
  40:     short   i_XXXXXX;   /* ### */
  41: /* SHOULD USE POINTERS, NOT INDICES, FOR HAS CHAIN */
  42:     short   i_hlink;    /* link in hash chain (iget/iput/ifind) */
  43: };
  44: 
  45: #ifdef KERNEL
  46: struct  inode *inode, *inodeNINODE;
  47: int ninode;
  48: 
  49: struct  inode *rootdir;     /* pointer to inode of root directory */
  50: 
  51: struct  inode *ialloc();
  52: struct  inode *ifind();
  53: struct  inode *iget();
  54: struct  inode *owner();
  55: struct  inode *maknode();
  56: struct  inode *namei();
  57: #endif
  58: 
  59: /* flags */
  60: #define ILOCK   01      /* inode is locked */
  61: #define IUPD    02      /* file has been modified */
  62: #define IACC    04      /* inode access time to be updated */
  63: #define IMOUNT  010     /* inode is mounted on */
  64: #define IWANT   020     /* some process waiting on lock */
  65: #define ITEXT   040     /* inode is pure text prototype */
  66: #define ICHG    0100        /* inode has been changed */
  67: 
  68: /* modes */
  69: #define IFMT    0170000     /* type of file */
  70: #define     IFCHR       0020000     /* character special */
  71: #define     IFDIR       0040000     /* directory */
  72: #define     IFBLK       0060000     /* block special */
  73: #define     IFREG       0100000     /* regular */
  74: #define     IFLNK       0120000     /* symbolic link */
  75: #define     IFPORTAL    0140000     /* portal */
  76: #define ISUID   04000       /* set user id on execution */
  77: #define ISGID   02000       /* set group id on execution */
  78: #define ISVTX   01000       /* save swapped text even after use */
  79: #define IREAD   0400        /* read, write, execute permissions */
  80: #define IWRITE  0200
  81: #define IEXEC   0100

Defined variables

inode defined in line 46; never used
inodeNINODE defined in line 46; never used
ninode defined in line 47; never used
rootdir defined in line 49; never used

Defined struct's

i_d defined in line 28; never used
i_f defined in line 24; never used
i_s defined in line 31; never used
inode defined in line 12; used 16 times

Defined macros

IACC defined in line 62; never used
ICHG defined in line 66; never used
IEXEC defined in line 81; never used
IFBLK defined in line 72; never used
IFCHR defined in line 70; never used
IFDIR defined in line 71; used 2 times
IFLNK defined in line 74; never used
IFMT defined in line 69; used 2 times
IFPORTAL defined in line 75; never used
IFREG defined in line 73; used 2 times
ILOCK defined in line 60; never used
IMOUNT defined in line 63; never used
IREAD defined in line 79; never used
ISGID defined in line 77; never used
ISUID defined in line 76; never used
ISVTX defined in line 78; never used
ITEXT defined in line 65; never used
IUPD defined in line 61; never used
IWANT defined in line 64; never used
IWRITE defined in line 80; never used
NADDR defined in line 10; used 9 times
i_addr defined in line 34; never used
i_lastr defined in line 35; never used
i_rdev defined in line 36; never used
i_socket defined in line 37; never used

Usage of this include

Last modified: 1983-04-28
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1273
Valid CSS Valid XHTML 1.0 Strict