BBLIST(5) — UNIX Programmer’s Manual
NAME
bblist − format of bad block list
SYNOPSIS
#include <dev/badblk.h>
DESCRIPTION
The bad block structure contains a list of damaged st506 sectors on the device, plus a replacement sector (within the bad block cylinder).
The structure of the bad block list as given in the include file is:
/∗
∗Format of the bad sector replacement track,
∗and associated data structures.
∗
∗Maximum number of bad blocks we can handle.
∗This number must be such that the "badblk_hdr" fit onto 512 bytes.
∗/
#defineBB_MAX84
typedefunsigned shorttrack_address;
typedefstruct{
unsigned shortcylinder;
track_addressblock;
} disc_address;
structbadblk_hdr{
unsigned bb_magic;/∗ Magic number ∗/
unsigned bb_number; /∗ No of bad blocks ∗/
disc_addressbb_blocks[BB_MAX];
track_addressbb_replacement[BB_MAX];
};
#defineBB_MAGIC ((‘B’ << 24) | (‘a’ << 16) | (‘d’ << 8) | (‘!’ << 0))
#defineBB_OFFSET4
Two copies of the bad block list structure are kept on the device. The layout of the cylinder is defined in ptable(5).
SEE ALSO
4.2 Berkeley Distribution — Revision 1.3 of 11/01/89