home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / OS2DASD / DMDEFS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  5.5 KB  |  134 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /*static char *SCCSID = "%w% %e%";*/
  13. /**************************************************************************
  14.  *
  15.  * SOURCE FILE NAME = DMDEFS.H
  16.  *
  17.  * DESCRIPTIVE NAME = OS2DASD.DMD - OS/2 DASD Device Manager
  18.  *
  19.  *
  20.  *
  21.  * VERSION = V2.0
  22.  *
  23.  * DATE
  24.  *
  25.  * DESCRIPTION : Typedefs/Defines for OS/2 DASD Mgr
  26.  *
  27.  *
  28.  *
  29. */
  30.  
  31. /*------------------------------*/
  32. /* Common typedefs              */
  33. /*------------------------------*/
  34. typedef struct _VolumeControlBlock *NPVOLCB, FAR *PVOLCB;
  35. typedef struct _UnitControlBlock   UNITCB, *NPUNITCB;
  36. typedef struct _FaultTolCB         *NPFTCB;
  37. typedef struct _VolChars           *NPVOLCHARS;
  38. typedef struct _BPB                BPB;
  39. typedef struct _DOSBOOTREC         DOSBOOTREC, _far *PDOSBOOTREC, *NPDOSBOOTREC;
  40. typedef struct _PB_Read_Write      PB_Read_Write, FAR *PPB_Read_Write;
  41. typedef struct _Req_List_Header    Req_List_Header, FAR *PReq_List_Header;
  42. typedef struct _PVDB               PVDB, *NPPVDB;
  43.  
  44. typedef struct _INITDATA     INITDATA;
  45. typedef struct _PARTITIONTABLE PARTITIONTABLE;
  46. typedef struct _DISKTABLE_ENTRY DISKTABLE_ENTRY;
  47.  
  48. typedef struct _CMDTABLE                                             /*@V84908*/
  49. {                                                                    /*@V84908*/
  50.    USHORT Cmd;                                                       /*@V84908*/
  51.    USHORT CmdType;                                                   /*@V84908*/
  52. } CMDTABLE;                                                          /*@V84908*/
  53.  
  54.  
  55. #define MAX_FIXED_DISKS         24
  56. #define MAX_PARTITIONS          24
  57. #define MAX_DRIVE_LETTERS       26
  58. #define MAX_QUEUING_COUNT       16
  59. #define NUM_DEFAULT_CWAS         4
  60. #define MAX_ADAPTERS_PER_ADD    16
  61. #define MAX_UNITS_PER_ADD       32
  62. #define INIT_POOL_SIZE          32 * 1024
  63.  
  64. /*** BPB Media Descriptor constants ***/
  65. #define MEDIA_FIXED_DISK  0xF8      /* Fixed Disk                        */
  66. #define MEDIA_720KB       0xF9      /* 3.5 inch / 720KB             2/9  */
  67. #define MEDIA_144MB       0xF0      /* 3.5 inch / 1.44 MB          2/18  */
  68. #define MEDIA_288MB       0xF0      /* 3.5 inch / 2.88 MB          2/36  */
  69. #define MEDIA_12MB        0xF9      /* 96TPI hi density drive      2/15  */
  70. #define MEDIA_180KB       0xFC      /* 48TPI 9 sector single sided  1/9  */
  71. #define MEDIA_360KB       0xFD      /* 48TPI 9 sector double sided  2/9  */
  72. #define MEDIA_160KB       0xFE      /* 48TPI 8 sector single sided  1/8  */
  73. #define MEDIA_320KB       0xFF      /* 48TPI 8 sector               2/8  */
  74.  
  75. /*** Device Types returned in Get Device Parms IOCTL */
  76. #define TYPE_360KB        0x00
  77. #define TYPE_12MB         0x01
  78. #define TYPE_720KB        0x02
  79. #define TYPE_FIXED_DISK   0x05
  80. #define TYPE_144MB        0x07
  81. #define TYPE_OTHER        0x08
  82. #define TYPE_288MB        0x09
  83.  
  84.  
  85. /* Change Media Flags */
  86. #define MEDIA_CHANGED           0xFF
  87. #define MEDIA_UNSURE_CHANGED    0x00
  88. #define MEDIA_UNCHANGED         0x01
  89.  
  90.  
  91. /*** Partition type constants ***/
  92. #define PARTITION_16M         0x01
  93. #define PARTITION_16Mto32M    0x04
  94. #define PARTITION_EBR         0x05
  95. #define PARTITION_32M         0x06
  96. #define PARTITION_IFS         0x07
  97. #define PARTITION_FTACTIVE    0x87
  98. #define PARTITION_FTINACTIVE  0xC7
  99.  
  100. /** Indices for CurIndex field **/
  101.  
  102. #define INDEX99      0x00           /* 96tpi in 96tpi drive   (5.25") */
  103. #define INDEX49      0x01           /* 48tpi in 96tpi drive   (5.25") */
  104. #define INDEX44      0x02           /* 48tpi in 48tpi drive   (5.25") */
  105. #define INDEX77      0x03           /* 720 KB in 720KB        (3.5")  */
  106. #define INDEX71      0x04           /* 720 KB in 1.44 MB      (3.5")  */
  107. #define INDEX11      0x05           /* 1.44 MB in 1.44 MB     (3.5")  */
  108.  
  109. #define MAXINDEX     INDEX11        /* Max. index supported for AT or 7552 */
  110.  
  111.  
  112. #define DISKTABLECOUNT          9
  113.  
  114.  
  115. /*----------------------------------------------------*/
  116. /* Global DDFlags defines                             */
  117. /*----------------------------------------------------*/
  118. #define DDF_NO_MEDIA            0x00000001    /* Medialess system */
  119. #define DDF_INIT_TIME           0x00000002    /* Init time flag           */
  120. #define DDF_FT_ENABLED          0x00000004    /* Fault Tolerance enabled  */
  121. #define DDF_DMAReadBack         0x00000008    /* DMA Readback 1=on, 0=off */
  122. #define DDF_DsktSuspended       0x00000010    /* 1=dskt suspended, 0=resumed */
  123. #define DDF_DISCARD_TRACE       0x00000020    /* Trace Code Discarded        *//*@V81576*/
  124. #define DDF_FT_LOCKED           0x00000080    /* FT Code locked              */
  125.  
  126.  
  127. /* MACROS */
  128.  
  129. #define ENABLE  _asm {sti}
  130. #define DISABLE _asm {cli}
  131. #define PUSHFLAGS _asm {pushf}
  132. #define POPFLAGS _asm {popf}
  133.  
  134.