root/include/linux/genhd.h

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

INCLUDED FROM


   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 #define CONFIG_MSDOS_PARTITION 1
  13 
  14 #ifdef __alpha__
  15 #define CONFIG_OSF_PARTITION 1
  16 #endif
  17         
  18 #define EXTENDED_PARTITION 5
  19 
  20 #define DM6_PARTITION           0x54    /* has DDO: use xlated geom & offset */
  21 #define EZD_PARTITION           0x55    /* EZ-DRIVE:  same as DM6 (we think) */
  22 #define DM6_AUX1PARTITION       0x51    /* no DDO:  use xlated geom */
  23 #define DM6_AUX3PARTITION       0x53    /* no DDO:  use xlated geom */
  24         
  25 struct partition {
  26         unsigned char boot_ind;         /* 0x80 - active */
  27         unsigned char head;             /* starting head */
  28         unsigned char sector;           /* starting sector */
  29         unsigned char cyl;              /* starting cylinder */
  30         unsigned char sys_ind;          /* What partition type */
  31         unsigned char end_head;         /* end head */
  32         unsigned char end_sector;       /* end sector */
  33         unsigned char end_cyl;          /* end cylinder */
  34         unsigned int start_sect;        /* starting sector counting from 0 */
  35         unsigned int nr_sects;          /* nr of sectors in partition */
  36 };
  37 
  38 struct hd_struct {
  39         long start_sect;
  40         long nr_sects;
  41 };
  42 
  43 struct gendisk {
  44         int major;                      /* major number of driver */
  45         const char *major_name;         /* name of major driver */
  46         int minor_shift;                /* number of times minor is shifted to
  47                                            get real minor */
  48         int max_p;                      /* maximum partitions per device */
  49         int max_nr;                     /* maximum number of real devices */
  50 
  51         void (*init)(struct gendisk *); /* Initialization called before we do our thing */
  52         struct hd_struct *part;         /* partition table */
  53         int *sizes;                     /* device size in blocks, copied to blk_size[] */
  54         int nr_real;                    /* number of real devices */
  55 
  56         void *real_devices;             /* internal use */
  57         struct gendisk *next;
  58 };
  59 
  60 extern int NR_GENDISKS;                 /* total */
  61 extern struct gendisk *gendisk_head;    /* linked list of disks */
  62 
  63 #endif

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