home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / bsd / sys / dkbad.h < prev    next >
Text File  |  1993-10-19  |  2KB  |  71 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * All rights reserved.  The CMU software License Agreement specifies
  5.  * the terms and conditions for use and redistribution.
  6.  */
  7. /*
  8.  * HISTORY
  9.  * $Log:    dkbad.h,v $
  10.  * Revision 2.3  89/03/09  22:03:23  rpd
  11.  *     More cleanup.
  12.  * 
  13.  * Revision 2.2  89/02/25  17:52:50  gm0w
  14.  *     Changes for cleanup.
  15.  * 
  16.  */
  17. /*
  18.  * Copyright (c) 1982, 1986 Regents of the University of California.
  19.  * All rights reserved.  The Berkeley software License Agreement
  20.  * specifies the terms and conditions for redistribution.
  21.  *
  22.  *    @(#)dkbad.h    7.1 (Berkeley) 6/4/86
  23.  */
  24.  
  25. #ifndef    _SYS_DKBAD_H_
  26. #define _SYS_DKBAD_H_
  27.  
  28. #import <sys/types.h>
  29.  
  30. /*
  31.  * Definitions needed to perform bad sector
  32.  * revectoring ala DEC STD 144.
  33.  *
  34.  * The bad sector information is located in the
  35.  * first 5 even numbered sectors of the last
  36.  * track of the disk pack.  There are five
  37.  * identical copies of the information, described
  38.  * by the dkbad structure.
  39.  *
  40.  * Replacement sectors are allocated starting with
  41.  * the first sector before the bad sector information
  42.  * and working backwards towards the beginning of
  43.  * the disk.  A maximum of 126 bad sectors are supported.
  44.  * The position of the bad sector in the bad sector table
  45.  * determines which replacement sector it corresponds to.
  46.  *
  47.  * The bad sector information and replacement sectors
  48.  * are conventionally only accessible through the
  49.  * 'c' file system partition of the disk.  If that
  50.  * partition is used for a file system, the user is
  51.  * responsible for making sure that it does not overlap
  52.  * the bad sector information or any replacement sector.s
  53.  */
  54.  
  55. struct dkbad {
  56.     long    bt_csn;            /* cartridge serial number */
  57.     u_short    bt_mbz;            /* unused; should be 0 */
  58.     u_short    bt_flag;        /* -1 => alignment cartridge */
  59.     struct bt_bad {
  60.         u_short    bt_cyl;        /* cylinder number of bad sector */
  61.         u_short    bt_trksec;    /* track and sector number */
  62.     } bt_bad[126];
  63. };
  64.  
  65. #define ECC    0
  66. #define SSE    1
  67. #define BSE    2
  68. #define CONT    3
  69.  
  70. #endif    _SYS_DKBAD_H_
  71.