home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / asm / SCSIDRV.ZIP / IOCTL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-06  |  2.3 KB  |  120 lines

  1. /*
  2. ** ioctl types that the driver understands
  3. */
  4. #define I_FORMAT    'F'
  5. #define I_ERASE        'E'
  6. #define I_REWIND    'R'
  7. #define I_LOAD        'L'
  8. #define I_NOLOAD    'N'
  9. #define I_SPACE        'S'
  10. #define I_FILEMARK    'M'
  11. #define I_REASSIGN    'A'
  12.  
  13. /*
  14. ** definition of the structure to pass to the SCSI driver
  15. **
  16. ** This should agree with the 'ioc' struct in 'struct.inc'
  17. */
  18. struct cmd {
  19.     short command;        /* command type */
  20.     short arg1;            /* command args */
  21.     short arg2;            /* command args */
  22.     short buf_seg;        /* command buffer segment */
  23.     short buf_ofs;        /* command buffer offset */
  24.     short buf_len;        /* command buffer length */
  25. };
  26.  
  27. /*
  28. ** Format Command options types
  29. */
  30. #define FORMAT_NORMAL (0x00)
  31. #define FORMAT_ADDLBA (0x10)
  32. #define FORMAT_ORIG (0x18)
  33. #define FORMAT_ADDCHI (0x1C)
  34.  
  35. /*
  36. ** Defect List types
  37. */
  38. #define DEFECT_LBA (1)
  39. #define DEFECT_CHI (2)
  40.  
  41. #define MAX_DEFECTS (64)
  42.  
  43. /*
  44. ** defect list header
  45. */
  46. struct defect_header {
  47.     char reserved;        /* reserved */
  48.     char options;        /* format options */
  49.     char dll_msb;        /* defect list length MSB */
  50.     char dll_lsb;        /* defect list length LSB */
  51. };
  52.  
  53. /*
  54. ** defect list entry / block number
  55. */
  56. struct defect_entry_lba {
  57.     char defect_lba3;    /* defect block address MSB */
  58.     char defect_lba2;
  59.     char defect_lba1;
  60.     char defect_lba0;    /* defect block address LSB */
  61. };
  62.  
  63. /*
  64. ** defect list / block number
  65. */
  66. struct defects_lba {
  67.     struct defect_header header;
  68.     struct defect_entry_lba list[MAX_DEFECTS];
  69. };
  70.  
  71. /*
  72. ** defect list entry / cyl-head-index
  73. */
  74. struct defect_entry_chi {
  75.     char defect_cyl2;    /* defect cylinder MSB */
  76.     char defect_cyl1;
  77.     char defect_cyl0;    /* defect cylinder LSB */
  78.     char defect_head;
  79.     char defect_idx3;    /* defect index MSB */
  80.     char defect_idx2;
  81.     char defect_idx1;
  82.     char defect_idx0;    /* defect index LSB */
  83. };
  84.  
  85. /*
  86. ** defect list / chl-head-index
  87. */
  88. struct defects_chi {
  89.     struct defect_header header;
  90.     struct defect_entry_chi list[MAX_DEFECTS];
  91. };
  92.  
  93. /*
  94. ** remap list header
  95. */
  96. struct remap_header {
  97.     char reserved;        /* reserved */
  98.     char reserved2;        /* reserved */
  99.     char rll_msb;        /* remap list length MSB */
  100.     char rll_lsb;        /* remap list length LSB */
  101. };
  102.  
  103. /*
  104. ** remap list entry
  105. */
  106. struct remap_entry {
  107.     char remap_lba3;    /* remap block address MSB */
  108.     char remap_lba2;
  109.     char remap_lba1;
  110.     char remap_lba0;    /* remap block address LSB */
  111. };
  112.  
  113. /*
  114. ** remap list
  115. */
  116. struct remaps {
  117.     struct remap_header header;
  118.     struct remap_entry list[MAX_DEFECTS];
  119. };
  120.