Annotation of researchv10no/netfs/serv/files11.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * FILES-11 ODS-1 data structures
        !             3:  * rude comments believed due to Rob Pike
        !             4:  */
        !             5: 
        !             6: struct filnam {
        !             7:        unsigned short f_nam[3];        /* File name (Radix-50) */
        !             8:        unsigned short f_typ;   /* File type (Radix-50) */
        !             9:        unsigned short f_ver;   /* Version number */
        !            10: };
        !            11: 
        !            12: struct uic {
        !            13:        char    u_prog;         /* Programmer number */
        !            14:        char    u_proj;         /* Project number */
        !            15: };
        !            16: 
        !            17: struct fileid {
        !            18:        unsigned short f_num;   /* File number */
        !            19:        unsigned short f_seq;   /* File sequence number (worthless concept) */
        !            20:        unsigned short f_rvn;   /* Relative volume number (ditto and MBZ) */
        !            21: };
        !            22: 
        !            23: struct fcs {
        !            24:        char    f_rtyp;         /* Record type */
        !            25:        char    f_ratt;         /* Record attributes */
        !            26:        unsigned short f_rsiz;  /* Record size */
        !            27:        unsigned short f_hibk[2];       /* Highest VBN allocated */
        !            28:        unsigned short f_efbk[2];       /* End of file block */
        !            29:        unsigned short f_ffby;  /* First free byte */
        !            30: };
        !            31: 
        !            32: /*
        !            33:  * record types and attributes
        !            34:  */
        !            35: #define        RTVAR   2       /* variable length text records */
        !            36: #define        RTCR    2       /* carriage return format */
        !            37: /* need RTBLK  xx      /* records don't cross blocks */
        !            38: 
        !            39: struct ident {
        !            40:        struct filnam i_fnam;   /* File name, type, version number */
        !            41:        unsigned short i_rvno;  /* Revision number */
        !            42:        char    i_rvdt[7];      /* Revision date (ASCII) */
        !            43:        char    i_rvti[6];      /* Revision time (ASCII) */
        !            44:        char    i_crdt[7];      /* Creation time (ASCII) */
        !            45:        char    i_crti[6];      /* Creation time (ASCII) */
        !            46:        char    i_exdt[7];      /* Expiration date (ASCII) */
        !            47:        char    i_UU;           /* Unused */
        !            48: };
        !            49: 
        !            50: struct map {
        !            51:        char    m_esqn;         /* Extension segment number */
        !            52:        char    m_ervn;         /* Extension relative volume number */
        !            53:        unsigned short m_efnu;  /* Extension file number */
        !            54:        unsigned short m_efsq;  /* Extension file sequence number */
        !            55:        char    m_ctsz;         /* Block count field size */
        !            56:        char    m_lbsz;         /* LBN Field size */
        !            57:        unsigned char m_use;    /* Map words in use */
        !            58:        unsigned char m_max;    /* Map words available */
        !            59:        unsigned char m_rtrvp[410];     /* Retrieval pointers */
        !            60: };
        !            61: 
        !            62: struct header {
        !            63:        char    h_idof;         /* Ident area offset */
        !            64:        char    h_mpof;         /* Map area offset */
        !            65:        unsigned short h_fnum;  /* File number */
        !            66:        unsigned short h_fseq;  /* File sequence number (why no RVN?) */
        !            67:        unsigned short h_flev;  /* File structure level */
        !            68:        struct uic h_fown;      /* File owner UIC */
        !            69:        short   h_fpro;         /* File protection code */
        !            70:        char    h_fcha[2];      /* File characteristics */
        !            71:        struct fcs h_fcs;       /* FCS area */
        !            72:        char    h_ufat[18];     /* User attribute area */
        !            73:        struct ident h_ident;   /* Ident area */
        !            74:        struct map h_map;       /* Map area */
        !            75: };
        !            76: 
        !            77: struct homeblock {
        !            78:        unsigned short H_ibsz;  /* Index file bitmap size */
        !            79:        unsigned short H_iblb[2];       /* Index file bitmap LBN */
        !            80:        unsigned short H_fmax;  /* Maximum number of files */
        !            81:        unsigned short H_sbcl;  /* Storage bitmap cluster factor */
        !            82:        unsigned short H_dvty;  /* Disk device type */
        !            83:        unsigned short H_vlev;  /* Volume structure level */
        !            84:        char    H_vnam[12];     /* Volume name */
        !            85:        char    H_UU1[4];       /* Unused 1 */
        !            86:        struct uic H_vown;      /* Volume owner UIC */
        !            87:        short   H_vpro;         /* Volume protection code */
        !            88:        char    H_vcha[2];      /* Volume characteristics */
        !            89:        short   H_fpro;         /* Default file protection */
        !            90:        char    H_UU2[6];       /* Unused 2 */
        !            91:        char    H_wisz;         /* Default window size */
        !            92:        char    H_fiex;         /* Default file extend */
        !            93:        char    H_lruc;         /* Directory pre-access limit */
        !            94:        char    H_UU3[11];      /* Unused 3 */
        !            95:        unsigned short H_chk1;  /* First checksum */
        !            96:        char    H_vdat[14];     /* Volume creation date */
        !            97:        char    H_UU4[398];     /* Unused 4 */
        !            98:        char    H_indn[12];     /* Volume name (don't you believe H_vnam?) */
        !            99:        char    H_indo[12];     /* Volume owner (in a different format!) */
        !           100:        char    H_indf[12];     /* Format type == "DECFILE11A " */
        !           101:        char    H_UU5[2];       /* Unused 5 */
        !           102:        unsigned short H_chk2;  /* Final checksum */
        !           103: };
        !           104: 
        !           105: struct directory {
        !           106:        struct fileid d_fid;    /* File id */
        !           107:        struct filnam d_fname;  /* File name, type, version number */
        !           108: };
        !           109: 
        !           110: #define        BLKSIZ  512             /* size of a block */
        !           111: 
        !           112: #define        HOMEBLK 1               /* home block is first 512-byte block */
        !           113: #define        HOMEOFF 512             /* or HOMEBLK+(HOMEOFF*j) for some j */
        !           114: 
        !           115: /*
        !           116:  * well-known files
        !           117:  */
        !           118: #define        FINDEX  1               /* index file */
        !           119: #define        FBITMAP 2               /* storage bitmap */
        !           120: #define        FROOT   4               /* root directory (MFD) */
        !           121: 
        !           122: /*
        !           123:  * fileid to blkno
        !           124:  * blkno wrt beginning of list in index file
        !           125:  * for the well-known files, wrt known first file header
        !           126:  */
        !           127: #define        fidtob(f)       ((f)-1)
        !           128: 
        !           129: /*
        !           130:  * blocks in the index file
        !           131:  * zero-origin, not 1-origin VBNs
        !           132:  */
        !           133: 
        !           134: /* boot block  0 */
        !           135: /* home block  1 */
        !           136: #define        IBITMAP 2               /* first block of bitmap */

unix.superglobalmegacorp.com

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