The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386/include/pc/msdos.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * msdos common header file
    3  * [obtained from mtools -wfj]
    4  * how to decipher DOS disk structures in coexisting with DOS
    5  *
    6  * $FreeBSD: stable/3/sys/i386/include/pc/msdos.h 50582 1999-08-29 16:07:53Z peter $
    7  */
    8 
    9 #define MSECTOR_SIZE    512             /* MSDOS sector size in bytes */
   10 #define MDIR_SIZE       32              /* MSDOS directory size in bytes */
   11 #define MAX_CLUSTER     8192            /* largest cluster size */
   12 #define MAX_PATH        128             /* largest MSDOS path length */
   13 #define MAX_DIR_SECS    64              /* largest directory (in sectors) */
   14 
   15 #define NEW             1
   16 #define OLD             0
   17 
   18 struct directory {
   19         unsigned char name[8];          /* file name */
   20         unsigned char ext[3];           /* file extension */
   21         unsigned char attr;             /* attribute byte */
   22         unsigned char reserved[10];     /* ?? */
   23         unsigned char time[2];          /* time stamp */
   24         unsigned char date[2];          /* date stamp */
   25         unsigned char start[2];         /* starting cluster number */
   26         unsigned char size[4];          /* size of the file */
   27 };
   28 
   29 struct bootsector {
   30         unsigned char jump[3];          /* Jump to boot code */
   31         unsigned char banner[8];        /* OEM name & version */
   32         unsigned char secsiz[2];        /* Bytes per sector hopefully 512 */
   33         unsigned char clsiz;            /* Cluster size in sectors */
   34         unsigned char nrsvsect[2];      /* Number of reserved (boot) sectors */
   35         unsigned char nfat;             /* Number of FAT tables hopefully 2 */
   36         unsigned char dirents[2];       /* Number of directory slots */
   37         unsigned char psect[2];         /* Total sectors on disk */
   38         unsigned char descr;            /* Media descriptor=first byte of FAT */
   39         unsigned char fatlen[2];        /* Sectors in FAT */
   40         unsigned char nsect[2];         /* Sectors/track */
   41         unsigned char nheads[2];        /* Heads */
   42         unsigned char nhs[4];           /* number of hidden sectors */
   43         unsigned char bigsect[4];       /* big total sectors */
   44         unsigned char junk[476];        /* who cares? */
   45 };
   46 
   47 /* DOS partition table -- located in boot block */
   48 
   49 #define DOSBBSECTOR     0       /* DOS boot block relative sector number */
   50 #define DOSPARTOFF      446
   51 #define NDOSPART        4
   52 
   53 struct dos_partition {
   54         unsigned char   dp_flag;        /* bootstrap flags */
   55         unsigned char   dp_shd;         /* starting head */
   56         unsigned char   dp_ssect;       /* starting sector */
   57         unsigned char   dp_scyl;        /* starting cylinder */
   58         unsigned char   dp_typ;         /* partition type */
   59 #define         DOSPTYP_386BSD  0xa5            /* 386BSD partition type */
   60         unsigned char   dp_ehd;         /* end head */
   61         unsigned char   dp_esect;       /* end sector */
   62         unsigned char   dp_ecyl;        /* end cylinder */
   63         unsigned long   dp_start;       /* absolute starting sector number */
   64         unsigned long   dp_size;        /* partition size in sectors */
   65 } dos_partitions[NDOSPART];

Cache object: 0a4c01525c08d43752636fafde1ab9ce


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.