1 /* 2 * Copyright (c) 1982, 1986 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 * 6 * @(#)dkbad.h 7.1 (Berkeley) 06/04/86 7 */ 8 9 /* 10 * Definitions needed to perform bad sector 11 * revectoring ala DEC STD 144. 12 * 13 * The bad sector information is located in the 14 * first 5 even numbered sectors of the last 15 * track of the disk pack. There are five 16 * identical copies of the information, described 17 * by the dkbad structure. 18 * 19 * Replacement sectors are allocated starting with 20 * the first sector before the bad sector information 21 * and working backwards towards the beginning of 22 * the disk. A maximum of 126 bad sectors are supported. 23 * The position of the bad sector in the bad sector table 24 * determines which replacement sector it corresponds to. 25 * 26 * The bad sector information and replacement sectors 27 * are conventionally only accessible through the 28 * 'c' file system partition of the disk. If that 29 * partition is used for a file system, the user is 30 * responsible for making sure that it does not overlap 31 * the bad sector information or any replacement sector.s 32 */ 33 34 struct dkbad { 35 long bt_csn; /* cartridge serial number */ 36 u_short bt_mbz; /* unused; should be 0 */ 37 u_short bt_flag; /* -1 => alignment cartridge */ 38 struct bt_bad { 39 u_short bt_cyl; /* cylinder number of bad sector */ 40 u_short bt_trksec; /* track and sector number */ 41 } bt_bad[126]; 42 }; 43 44 #define ECC 0 45 #define SSE 1 46 #define BSE 2 47 #define CONT 3 48