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 #ifdef __sparc__
19 #defineCONFIG_SUN_PARTITION 1
20 #endif 21
22 /* These two have identical behaviour; use the second one if DOS fdisk gets 23 confused about extended/logical partitions starting past cylinder 1023. */ 24 #defineDOS_EXTENDED_PARTITION 5
25 #defineLINUX_EXTENDED_PARTITION 0x85
26
27 #defineDM6_PARTITION 0x54 /* has DDO: use xlated geom & offset */ 28 #defineEZD_PARTITION 0x55 /* EZ-DRIVE: same as DM6 (we think) */ 29 #defineDM6_AUX1PARTITION 0x51 /* no DDO: use xlated geom */ 30 #defineDM6_AUX3PARTITION 0x53 /* no DDO: use xlated geom */ 31
32 structpartition{ 33 unsignedchar boot_ind; /* 0x80 - active */ 34 unsignedcharhead; /* starting head */ 35 unsignedcharsector; /* starting sector */ 36 unsignedcharcyl; /* starting cylinder */ 37 unsignedcharsys_ind; /* What partition type */ 38 unsignedcharend_head; /* end head */ 39 unsignedcharend_sector; /* end sector */ 40 unsignedcharend_cyl; /* end cylinder */ 41 unsignedintstart_sect; /* starting sector counting from 0 */ 42 unsignedintnr_sects; /* nr of sectors in partition */ 43 };
44
45 structhd_struct{ 46 longstart_sect;
47 longnr_sects;
48 };
49
50 structgendisk{ 51 intmajor; /* major number of driver */ 52 constchar *major_name; /* name of major driver */ 53 intminor_shift; /* number of times minor is shifted to 54 get real minor */ 55 intmax_p; /* maximum partitions per device */ 56 intmax_nr; /* maximum number of real devices */ 57
58 void (*init)(structgendisk *); /* Initialization called before we do our thing */ 59 structhd_struct *part; /* partition table */ 60 int *sizes; /* device size in blocks, copied to blk_size[] */ 61 intnr_real; /* number of real devices */ 62
63 void *real_devices; /* internal use */ 64 structgendisk *next;
65 };
66
67 externstructgendisk *gendisk_head; /* linked list of disks */ 68
69 #endif