Subject: kern/3785: adosfs misses diagnostic for bad 'secondary' types
To: None <>
From: Michael van Elst <>
List: netbsd-bugs
Date: 06/24/1997 22:32:05
>Number:         3785
>Category:       kern
>Synopsis:       adosfs misses diagnostic for bad 'secondary' type
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 24 13:50:02 1997
>Originator:     Michael van Elst
>Release:        NetBSD-current 20 Jun 1997
Amiga A3000/060, NetBSD-current, adosfs

System: NetBSD lemming 1.2G NetBSD 1.2G (LEMMING) #10: Sun Jun 22 21:26:36 MEST 1997 root@lemming:/usr/src/sys/arch/amiga/compile/LEMMING amiga

	AmigaOS FastFileSystem meta data blocks contain two keys that
	identify a block. adosfs warns about blocks encountered
	that have an invalid primary key if compiled with DIAGNOSTIC
	but silently drops the error from invalid secondary keys.

	Also, the warning about an invalid primary doesn't show the
	bad key value encountered.

	create an adosfs partition with a meta block with a bad
	secondary key and see nothing on a NetBSD system even when
	the kernel is compiled with DIAGNOSTIC.

	Modify adosfs/adutil.c
	<               printf("adosfs: aget: bad primary type blk %ld\n",
	<                   bp->b_blkno / amp->secsperblk);
	>               printf("adosfs: aget: bad primary type blk %ld (type
	= %d)\n",
	>                   bp->b_blkno / amp->secsperblk, adoswordn(bp,0));
	> #ifdef DIAGNOSTIC
	>       printf("adosfs: aget: bad secondary type blk %ld (type =
	>           bp->b_blkno / amp->secsperblk,adoswordn(bp, amp->nwords
	- 1));
	> #endif