Annotation of lucent/sys/src/boot/pc/dosfs.h, revision 1.1.1.1

1.1       root        1: typedef struct Dosboot Dosboot;
                      2: typedef struct Dos     Dos;
                      3: typedef struct Dosdir  Dosdir;
                      4: typedef struct Dosfile Dosfile;
                      5: typedef struct Dospart Dospart;
                      6: 
                      7: struct Dospart
                      8: {
                      9:        uchar flag;             /* active flag */
                     10:        uchar shead;            /* starting head */
                     11:        uchar scs[2];           /* starting cylinder/sector */
                     12:        uchar type;             /* partition type */
                     13:        uchar ehead;            /* ending head */
                     14:        uchar ecs[2];           /* ending cylinder/sector */
                     15:        uchar start[4];         /* starting sector */
                     16:        uchar len[4];           /* length in sectors */
                     17: };
                     18: 
                     19: struct Dosboot{
                     20:        uchar   magic[3];
                     21:        uchar   version[8];
                     22:        uchar   sectsize[2];
                     23:        uchar   clustsize;
                     24:        uchar   nresrv[2];
                     25:        uchar   nfats;
                     26:        uchar   rootsize[2];
                     27:        uchar   volsize[2];
                     28:        uchar   mediadesc;
                     29:        uchar   fatsize[2];
                     30:        uchar   trksize[2];
                     31:        uchar   nheads[2];
                     32:        uchar   nhidden[4];
                     33:        uchar   bigvolsize[4];
                     34:        uchar   driveno;
                     35:        uchar   reserved0;
                     36:        uchar   bootsig;
                     37:        uchar   volid[4];
                     38:        uchar   label[11];
                     39:        uchar   reserved1[8];
                     40: };
                     41: 
                     42: struct Dosfile{
                     43:        Dos     *dos;           /* owning dos file system */
                     44:        char    name[8];
                     45:        char    ext[3];
                     46:        uchar   attr;
                     47:        long    length;
                     48:        long    pstart;         /* physical start cluster address */
                     49:        long    pcurrent;       /* physical current cluster address */
                     50:        long    lcurrent;       /* logical current cluster address */
                     51:        long    offset;
                     52: };
                     53: 
                     54: struct Dos{
                     55:        int     dev;                            /* device id */
                     56:        long    (*read)(int, void*, long);      /* read routine */
                     57:        long    (*seek)(int, long);             /* seek routine */
                     58: 
                     59:        int     start;          /* start of file system */
                     60:        int     sectsize;       /* in bytes */
                     61:        int     clustsize;      /* in sectors */
                     62:        int     clustbytes;     /* in bytes */
                     63:        int     nresrv;         /* sectors */
                     64:        int     nfats;          /* usually 2 */
                     65:        int     rootsize;       /* number of entries */
                     66:        int     volsize;        /* in sectors */
                     67:        int     mediadesc;
                     68:        int     fatsize;        /* in sectors */
                     69:        int     fatclusters;
                     70:        int     fatbits;        /* 12 or 16 */
                     71:        long    fataddr;        /* sector number */
                     72:        long    rootaddr;
                     73:        long    dataaddr;
                     74:        long    freeptr;
                     75: 
                     76:        Dosfile root;
                     77: };
                     78: 
                     79: struct Dosdir{
                     80:        uchar   name[8];
                     81:        uchar   ext[3];
                     82:        uchar   attr;
                     83:        uchar   reserved[10];
                     84:        uchar   time[2];
                     85:        uchar   date[2];
                     86:        uchar   start[2];
                     87:        uchar   length[4];
                     88: };
                     89: 
                     90: #define        DRONLY  0x01
                     91: #define        DHIDDEN 0x02
                     92: #define        DSYSTEM 0x04
                     93: #define        DVLABEL 0x08
                     94: #define        DDIR    0x10
                     95: #define        DARCH   0x20
                     96: 
                     97: extern int chatty;
                     98: 
                     99: extern int dosboot(Dos*, char*);
                    100: extern int dosinit(Dos*);
                    101: extern long dosread(Dosfile*, void*, long);
                    102: extern int dosstat(Dos*, char*, Dosfile*);
                    103: extern int doswalk(Dosfile*, char*);
                    104: 
                    105: extern int plan9ini(Dos*);

unix.superglobalmegacorp.com

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