Annotation of Net2/isofs/iso.h, revision 1.1.1.2

1.1.1.2 ! root        1: /*
        !             2:  *     iso.h,v 1.3 1993/07/19 13:40:01 cgd Exp
        !             3:  */
        !             4: 
1.1       root        5: #define ISODCL(from, to) (to - from + 1)
                      6: 
                      7: struct iso_volume_descriptor {
                      8:        char type[ISODCL(1,1)]; /* 711 */
                      9:        char id[ISODCL(2,6)];
                     10:        char version[ISODCL(7,7)];
                     11:        char data[ISODCL(8,2048)];
                     12: };
                     13: 
                     14: /* volume descriptor types */
                     15: #define ISO_VD_PRIMARY 1
                     16: #define ISO_VD_END 255
                     17: 
                     18: #define ISO_STANDARD_ID "CD001"
1.1.1.2 ! root       19: #define ISO_ECMA_ID     "CDW01"
1.1       root       20: 
                     21: struct iso_primary_descriptor {
                     22:        char type                       [ISODCL (  1,   1)]; /* 711 */
                     23:        char id                         [ISODCL (  2,   6)];
                     24:        char version                    [ISODCL (  7,   7)]; /* 711 */
                     25:        char unused1                    [ISODCL (  8,   8)];
                     26:        char system_id                  [ISODCL (  9,  40)]; /* achars */
                     27:        char volume_id                  [ISODCL ( 41,  72)]; /* dchars */
                     28:        char unused2                    [ISODCL ( 73,  80)];
                     29:        char volume_space_size          [ISODCL ( 81,  88)]; /* 733 */
                     30:        char unused3                    [ISODCL ( 89, 120)];
                     31:        char volume_set_size            [ISODCL (121, 124)]; /* 723 */
                     32:        char volume_sequence_number     [ISODCL (125, 128)]; /* 723 */
                     33:        char logical_block_size         [ISODCL (129, 132)]; /* 723 */
                     34:        char path_table_size            [ISODCL (133, 140)]; /* 733 */
                     35:        char type_l_path_table          [ISODCL (141, 144)]; /* 731 */
                     36:        char opt_type_l_path_table      [ISODCL (145, 148)]; /* 731 */
                     37:        char type_m_path_table          [ISODCL (149, 152)]; /* 732 */
                     38:        char opt_type_m_path_table      [ISODCL (153, 156)]; /* 732 */
                     39:        char root_directory_record      [ISODCL (157, 190)]; /* 9.1 */
                     40:        char volume_set_id              [ISODCL (191, 318)]; /* dchars */
                     41:        char publisher_id               [ISODCL (319, 446)]; /* achars */
                     42:        char preparer_id                [ISODCL (447, 574)]; /* achars */
                     43:        char application_id             [ISODCL (575, 702)]; /* achars */
                     44:        char copyright_file_id          [ISODCL (703, 739)]; /* 7.5 dchars */
                     45:        char abstract_file_id           [ISODCL (740, 776)]; /* 7.5 dchars */
                     46:        char bibliographic_file_id      [ISODCL (777, 813)]; /* 7.5 dchars */
                     47:        char creation_date              [ISODCL (814, 830)]; /* 8.4.26.1 */
                     48:        char modification_date          [ISODCL (831, 847)]; /* 8.4.26.1 */
                     49:        char expiration_date            [ISODCL (848, 864)]; /* 8.4.26.1 */
                     50:        char effective_date             [ISODCL (865, 881)]; /* 8.4.26.1 */
                     51:        char file_structure_version     [ISODCL (882, 882)]; /* 711 */
                     52:        char unused4                    [ISODCL (883, 883)];
                     53:        char application_data           [ISODCL (884, 1395)];
                     54:        char unused5                    [ISODCL (1396, 2048)];
                     55: };
                     56: 
                     57: struct iso_directory_record {
                     58:        char length                     [ISODCL (1, 1)]; /* 711 */
                     59:        char ext_attr_length            [ISODCL (2, 2)]; /* 711 */
1.1.1.2 ! root       60:        unsigned char extent            [ISODCL (3, 10)]; /* 733 */
        !            61:        unsigned char size              [ISODCL (11, 18)]; /* 733 */
1.1       root       62:        char date                       [ISODCL (19, 25)]; /* 7 by 711 */
                     63:        char flags                      [ISODCL (26, 26)];
                     64:        char file_unit_size             [ISODCL (27, 27)]; /* 711 */
                     65:        char interleave                 [ISODCL (28, 28)]; /* 711 */
                     66:        char volume_sequence_number     [ISODCL (29, 32)]; /* 723 */
                     67:        char name_len                   [ISODCL (33, 33)]; /* 711 */
                     68:        char name                       [0];
                     69: };
                     70: 
1.1.1.2 ! root       71: /* CD-ROM Fromat type */
        !            72: enum ISO_FTYPE  { ISO_FTYPE_9660, ISO_FTYPE_RRIP, ISO_FTYPE_ECMA };
        !            73: 
1.1       root       74: struct iso_mnt {
                     75:        int logical_block_size;
                     76:        int volume_space_size;
                     77:        struct vnode *im_devvp;
                     78:        char im_fsmnt[50];
                     79:        
                     80:        int im_ronly;
                     81:        int im_fmod;
                     82:        struct mount *im_mountp;
                     83:        dev_t im_dev;
                     84: 
                     85:        int im_bshift;
                     86:        int im_bmask;
                     87:        int im_bsize;
                     88: 
                     89:        char root[ISODCL (157, 190)];
                     90:        int root_extent;
                     91:        int root_size;
1.1.1.2 ! root       92:        enum ISO_FTYPE  iso_ftype;
1.1       root       93: };
                     94: 
                     95: #define VFSTOISOFS(mp) ((struct iso_mnt *)((mp)->mnt_data))
                     96: 
                     97: #define iso_blkoff(imp, loc) ((loc) & ~(imp)->im_bmask)
                     98: #define iso_lblkno(imp, loc) ((loc) >> (imp)->im_bshift)
                     99: #define iso_blksize(imp, ip, lbn) ((imp)->im_bsize)
                    100: #define iso_lblktosize(imp, blk) ((blk) << (imp)->im_bshift)
                    101: 
                    102: 
                    103: int isofs_mount __P((struct mount *mp, char *path, caddr_t data,
                    104:        struct nameidata *ndp, struct proc *p));
                    105: int isofs_start __P((struct mount *mp, int flags, struct proc *p));
                    106: int isofs_unmount __P((struct mount *mp, int mntflags, struct proc *p));
                    107: int isofs_root __P((struct mount *mp, struct vnode **vpp));
                    108: int isofs_statfs __P((struct mount *mp, struct statfs *sbp, struct proc *p));
                    109: int isofs_sync __P((struct mount *mp, int waitfor));
                    110: int isofs_fhtovp __P((struct mount *mp, struct fid *fhp, struct vnode **vpp));
                    111: int isofs_vptofh __P((struct vnode *vp, struct fid *fhp));
                    112: int isofs_init __P(());
                    113: 

unix.superglobalmegacorp.com

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