genhd.h

Go to the documentation of this file.
00001 #ifndef _LINUX_GENHD_H
00002 #define _LINUX_GENHD_H
00003 
00004 /**
00005 *
00006 
00007  *      genhd.h Copyright (C) 1992 Drew Eckhardt
00008  *      Generic hard disk header file by  
00009  *              Drew Eckhardt
00010  *
00011  *              <drew@colorado.edu>
00012 
00013 
00014 */
00015         
00016 #define EXTENDED_PARTITION 5
00017         
00018 struct partition {
00019         unsigned char boot_ind;         ///< 0x80 - active 
00020         unsigned char head;             ///< starting head 
00021         unsigned char sector;           ///< starting sector 
00022         unsigned char cyl;              ///< starting cylinder 
00023         unsigned char sys_ind;          ///< What partition type 
00024         unsigned char end_head;         ///< end head 
00025         unsigned char end_sector;       ///< end sector 
00026         unsigned char end_cyl;          ///< end cylinder 
00027         unsigned int start_sect;        ///< starting sector counting from 0 
00028         unsigned int nr_sects;          ///< nr of sectors in partition 
00029 };
00030 
00031 struct hd_struct {
00032         long start_sect;
00033         long nr_sects;
00034 };
00035 
00036 struct gendisk {
00037         int major;                      ///< major number of driver 
00038         char *major_name;               ///< name of major driver 
00039         int minor_shift;                /* number of times minor is shifted to
00040 
00041 
00042 */
00043         int max_p;                      ///< maximum partitions per device 
00044         int max_nr;                     ///< maximum number of real devices 
00045 
00046         void (*init)(void);             ///< Initialization called before we do our thing 
00047         struct hd_struct *part;         ///< partition table 
00048         int *sizes;                     ///< size of device in blocks 
00049         int nr_real;                    ///< number of real devices 
00050 
00051         void *real_devices;             ///< internal use 
00052         struct gendisk *next;
00053 };
00054 
00055 extern int NR_GENDISKS;                 ///< total 
00056 extern struct gendisk *gendisk_head;    ///< linked list of disks 
00057 
00058 #endif

Generated on Mon May 1 21:47:00 2006 for KernelAPI by  doxygen 1.4.6-5