* Copyright (c) 1982, 1986 The Regents of the University of California.
* %sccs.include.redist.c%
* @(#)dkbad.c 7.3 (Berkeley) %G%
* Search the bad sector table looking for
* the specified sector. Return index if found.
* Return -1 if not found.
register struct dkbad
*bt
;
blk
= ((long)cyl
<< 16) + (trk
<< 8) + sec
;
for (i
= 0; i
< 126; i
++) {
bblk
= ((long)bt
->bt_bad
[i
].bt_cyl
<< 16) + bt
->bt_bad
[i
].bt_trksec
;
if (blk
< bblk
|| bblk
< 0)