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 #defineEXTENDED_PARTITION 5
13
14 structpartition{ 15 unsignedchar boot_ind; /* 0x80 - active */ 16 unsignedcharhead; /* starting head */ 17 unsignedcharsector; /* starting sector */ 18 unsignedcharcyl; /* starting cylinder */ 19 unsignedcharsys_ind; /* What partition type */ 20 unsignedcharend_head; /* end head */ 21 unsignedcharend_sector; /* end sector */ 22 unsignedcharend_cyl; /* end cylinder */ 23 unsignedintstart_sect; /* starting sector counting from 0 */ 24 unsignedintnr_sects; /* nr of sectors in partition */ 25 };
26
27 structhd_struct{ 28 longstart_sect;
29 longnr_sects;
30 };
31
32 structgendisk{ 33 intmajor; /* major number of driver */ 34 char *major_name; /* name of major driver */ 35 intminor_shift; /* number of times minor is shifted to 36 get real minor */ 37 intmax_p; /* maximum partitions per device */ 38 intmax_nr; /* maximum number of real devices */ 39
40 void (*init)(void); /* Initialization called before we do our thing */ 41 structhd_struct *part; /* partition table */ 42 int *sizes; /* size of device in blocks */ 43 intnr_real; /* number of real devices */ 44
45 void *real_devices; /* internal use */ 46 structgendisk *next;
47 };
48
49 externint NR_GENDISKS; /* total */ 50 externstructgendisk *gendisk_head; /* linked list of disks */ 51
52 #endif