root/include/linux/genhd.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _GENHD_H
   2 #define _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 #define EXTENDED_PARTITION 5
  13         
  14 struct partition {
  15         unsigned char boot_ind;         /* 0x80 - active */
  16         unsigned char head;             /* starting head */
  17         unsigned char sector;           /* starting sector */
  18         unsigned char cyl;              /* starting cylinder */
  19         unsigned char sys_ind;          /* What partition type */
  20         unsigned char end_head;         /* end head */
  21         unsigned char end_sector;       /* end sector */
  22         unsigned char end_cyl;          /* end cylinder */
  23         unsigned int start_sect;        /* starting sector counting from 0 */
  24         unsigned int nr_sects;          /* nr of sectors in partition */
  25 };
  26 
  27 struct hd_struct {
  28         long start_sect;
  29         long nr_sects;
  30 };
  31 
  32 struct gendisk {
  33         int major;                      /* major number of driver */
  34         char *major_name;               /* name of major driver */
  35         int minor_shift;                /* number of times minor is shifted to
  36                                            get real minor */
  37         int max_p;                      /* maximum partitions per device */
  38         int max_nr;                     /* maximum number of real devices */
  39 
  40         void (*init)(void);             /* Initialization called before we do our thing */
  41         struct hd_struct *part;         /* partition table */
  42         int *sizes;                     /* block sizes */
  43         int nr_real;                    /* number of real devices */
  44 
  45         void *real_devices;             /* internal use */
  46         struct gendisk *next;
  47 };
  48 
  49 extern int NR_GENDISKS;                 /* total */
  50 extern struct gendisk *gendisk_head;    /* linked list of disks */
  51 
  52 #endif

/* [previous][next][first][last][top][bottom][index][help] */