Subject: Re: kern/2675: [dM] 8 partitions is awfully few
To: None <gnats-bugs@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 08/05/1996 16:28:07
> Synopsis:       [dM] 8 partitions is awfully few

> --- OLD/sys/arch/sparc/sparc/disksubr.c	Thu Jan  1 00:00:00 1970
> +++ NEW/sys/arch/sparc/sparc/disksubr.c	Thu Jan  1 00:00:00 1970
> @@ -285,14 +285,16 @@
>  #define dkpart(dev) (minor(dev) & 7)
>  
>  	struct partition *p = lp->d_partitions + dkpart(bp->b_dev);
> -	int labelsect = lp->d_partitions[0].p_offset;
>  	int maxsz = p->p_size;

Duh.  Fix that up to read

#define dkpart(dev) (((unsigned int)minor(dev)) % MAXPARTITIONS)

which is probably what it should have been anyway.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu
		    01 EE 31 F6 BB 0C 34 36  00 F3 7C 5A C1 A0 67 1D