Annotation of xinu/h/file.h, revision 1.1.1.2

1.1       root        1: /* file.h */
                      2: 
1.1.1.2 ! root        3: /* Local disk layout: disk block 0 is directory, then index area, and  */
        !             4: /* then data blocks.  Each disk block (512 bytes) in the index area    */
        !             5: /* contains 8 iblocks, which are 64 bytes long.  Iblocks are referenced        */
        !             6: /* relative to 0, so the disk block address of iblock k is given by    */
        !             7: /* truncate(k/8)+1.  The offset of iblock k within its disk block is   */
        !             8: /* given by 64*remainder(k,8).  The directory entry points to a linked */
        !             9: /* list of iblocks, and each iblock contains pointers to IBLEN (29) data*/
        !            10: /* blocks. Index pointers contain a valid data block address or DBNULL.        */
1.1       root       11: 
1.1.1.2 ! root       12: #include <iblock.h>
1.1       root       13: 
1.1.1.2 ! root       14: #define        EOF             -2              /* value returned on end-of-file*/
        !            15: #define        FLREAD          001             /* fl_mode bit for "read"       */
        !            16: #define        FLWRITE         002             /* fl_mode bit for "write"      */
        !            17: #define        FLRW            003             /* fl_mode bits for read+write  */
        !            18: #define        FLNEW           010             /* fl_mode bit for "new file"   */
        !            19: #define        FLOLD           020             /* fl_mode bit for "old file"   */
1.1       root       20: 
1.1.1.2 ! root       21: struct flblk   {                       /* file "device" control block  */
        !            22:        int     fl_id;                  /* file's "device id" in devtab */
        !            23:        int     fl_dev;                 /* file is on this disk device  */
        !            24:        int     fl_pid;                 /* process id accessing the file*/
        !            25:        struct  fdes    *fl_dent;       /* file's in-core dir. entry    */
        !            26:        int     fl_mode;                /* FLREAD, FLWRITE, or both     */
        !            27:        IBADDR  fl_iba;                 /* address of iblock in fl_iblk */
        !            28:        struct  iblk    fl_iblk;        /* current iblock for file      */
        !            29:        int     fl_ipnum;               /* current iptr in fl_iblk      */
        !            30:        long    fl_pos;                 /* current file position (bytes)*/
        !            31:        Bool    fl_dch;                 /* has fl_buff been changed?    */
        !            32:        char    *fl_bptr;               /* ptr to next char in fl_buff  */
        !            33:        char    fl_buff[DBUFSIZ];       /* current data block for file  */
        !            34: };
1.1       root       35: 
1.1.1.2 ! root       36: #ifdef Ndf
        !            37: extern struct  flblk   fltab[];
        !            38: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.