BBLIST(5)

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.
     */
    #define	BB_MAX	84
    typedef	unsigned  short	track_address;
    typedef	struct	{
    	unsigned  short	cylinder;
    	track_address	block;
    }  disc_address;
    struct	badblk_hdr	{
    	unsigned  	bb_magic;	/*  Magic number  */
    	unsigned  	bb_number;	/*  No of bad blocks  */
    	disc_address	bb_blocks[BB_MAX];
    	track_address	bb_replacement[BB_MAX];
    };
    #define	BB_MAGIC	((`B' << 24) | (`a' << 16) | (`d' << 8) | (`!' << 0))
    #define	BB_OFFSET	4

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
bbutil(8), ptable(5)