* Include the actual type of a bad primary block in diagnostic output.
* Add diagnostic output for bad secondary block types. From Michael van Elst <mlelstv@serpens.swb.de> in PR kern/3785.
This commit is contained in:
parent
44de15e66c
commit
4c2700de65
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: adutil.c,v 1.15 1996/10/13 02:52:07 christos Exp $ */
|
/* $NetBSD: adutil.c,v 1.16 1997/06/26 21:36:58 kleink Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 Christian E. Hopps
|
* Copyright (c) 1994 Christian E. Hopps
|
||||||
|
@ -110,12 +110,15 @@ adosfs_getblktype(amp, bp)
|
||||||
*/
|
*/
|
||||||
if (adoswordn(bp, 0) != BPT_SHORT) {
|
if (adoswordn(bp, 0) != BPT_SHORT) {
|
||||||
#ifdef DIAGNOSTIC
|
#ifdef DIAGNOSTIC
|
||||||
printf("adosfs: aget: bad primary type blk %ld\n",
|
printf("adosfs: aget: bad primary type blk %ld (type = %d)\n",
|
||||||
bp->b_blkno / amp->secsperblk);
|
bp->b_blkno / amp->secsperblk, adoswordn(bp,0));
|
||||||
#endif
|
#endif
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check secondary block type.
|
||||||
|
*/
|
||||||
switch (adoswordn(bp, amp->nwords - 1)) {
|
switch (adoswordn(bp, amp->nwords - 1)) {
|
||||||
case BST_RDIR: /* root block */
|
case BST_RDIR: /* root block */
|
||||||
return (AROOT);
|
return (AROOT);
|
||||||
|
@ -130,6 +133,12 @@ adosfs_getblktype(amp, bp)
|
||||||
case BST_SLINK: /* soft link */
|
case BST_SLINK: /* soft link */
|
||||||
return (ASLINK);
|
return (ASLINK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DIAGNOSTIC
|
||||||
|
printf("adosfs: aget: bad secondary type blk %ld (type = %d)\n",
|
||||||
|
bp->b_blkno / amp->secsperblk, adoswordn(bp, amp->nwords - 1));
|
||||||
|
#endif
|
||||||
|
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue