/* <vms/lib/pbbdef.h>
 *
 *	F11DEF - pending bad block definitions		[not in Starlet]
 */
#ifndef _PBBDEF_H
#define _PBBDEF_H

/*
   Pending bad block file record format. Each record describes a disk block
   on which an error has occurred which has not been turned over to the bad
   block file.
 */
#define PBB$V_READERR	0
#define PBB$V_WRITERR	1
#define PBB$M_READERR	(1<<PBB$V_READERR)	/* 0x01 */
#define PBB$M_WRITERR	(1<<PBB$V_WRITERR)	/* 0x02 */
#define PBB$S_FID	6
#define PBB$K_LENGTH	16	/* length of entry */
#define PBB$C_LENGTH	16
#define PBB$S_PBBDEF	16
struct pbbdef {
    unsigned short pbb$w_fid[3];	/* file ID of containing file */
    union {
	unsigned char pbb$b_flags;	/* status flags */
	struct {
	    unsigned pbb$v_readerr : 1; /* read error occurred */
	    unsigned pbb$v_writerr : 1; /* write error occurred */
	    unsigned		   : 6; /* padding */
	} pbb$r_flags_bits;
    } pbb$r_flags_overlay;
    unsigned char pbb$b_count;		/* error count */
    unsigned long pbb$l_vbn;		/* virtual block in file */
    unsigned long pbb$l_lbn;		/* logical block number */
};

#endif	/*_PBBDEF_H*/
