1 #ifndef_LINUX_GENHD_H 2 #define_LINUX_GENHD_H 3
4 /* 5 * genhd.h Copyright (C) 1992 Drew Eckhardt 6 * Generic hard disk header file by 7 * Drew Eckhardt 8 * 9 * <drew@colorado.edu> 10 */ 11
12 #defineCONFIG_MSDOS_PARTITION 1
13
14 #ifdef__alpha__ 15 #defineCONFIG_OSF_PARTITION 1
16 #endif 17
18 /* These two have identical behaviour; use the second one if DOS fdisk gets 19 confused about extended/logical partitions starting past cylinder 1023. */ 20 #defineDOS_EXTENDED_PARTITION 5
21 #defineLINUX_EXTENDED_PARTITION 0x85
22
23 #defineDM6_PARTITION 0x54 /* has DDO: use xlated geom & offset */ 24 #defineEZD_PARTITION 0x55 /* EZ-DRIVE: same as DM6 (we think) */ 25 #defineDM6_AUX1PARTITION 0x51 /* no DDO: use xlated geom */ 26 #defineDM6_AUX3PARTITION 0x53 /* no DDO: use xlated geom */ 27
28 structpartition{ 29 unsignedchar boot_ind; /* 0x80 - active */ 30 unsignedcharhead; /* starting head */ 31 unsignedcharsector; /* starting sector */ 32 unsignedcharcyl; /* starting cylinder */ 33 unsignedcharsys_ind; /* What partition type */ 34 unsignedcharend_head; /* end head */ 35 unsignedcharend_sector; /* end sector */ 36 unsignedcharend_cyl; /* end cylinder */ 37 unsignedintstart_sect; /* starting sector counting from 0 */ 38 unsignedintnr_sects; /* nr of sectors in partition */ 39 };
40
41 structhd_struct{ 42 longstart_sect;
43 longnr_sects;
44 };
45
46 structgendisk{ 47 intmajor; /* major number of driver */ 48 constchar *major_name; /* name of major driver */ 49 intminor_shift; /* number of times minor is shifted to 50 get real minor */ 51 intmax_p; /* maximum partitions per device */ 52 intmax_nr; /* maximum number of real devices */ 53
54 void (*init)(structgendisk *); /* Initialization called before we do our thing */ 55 structhd_struct *part; /* partition table */ 56 int *sizes; /* device size in blocks, copied to blk_size[] */ 57 intnr_real; /* number of real devices */ 58
59 void *real_devices; /* internal use */ 60 structgendisk *next;
61 };
62
63 externstructgendisk *gendisk_head; /* linked list of disks */ 64
65 #endif