Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 1997 22:00:51 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@freebsd.org, syssgm@dtir.qld.gov.au
Cc:        davidg@root.com
Subject:   Re: disklabel -- owner?
Message-ID:  <199704291200.WAA02048@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>On a related topic, the disk device numbers are arrange in an ugly
>way, presumably for backward compatibilty reasons.  Are these reasons
>still valid?

Yes, there are a lot of /dev directories with "stable" device numbers
out there.  It's painful to boot with an old kernel and have it access
the wrong partitions.

>The current "type / unit2 / slice / major / unit1 / part"
>could be rearranged to "major / unit / slice / part" (I don't know what
>"type" is here. Grep didn't help me either.).

"type" is supposed to be reserved for private use by drivers.  AFAIK, it
is only used by my version of the fd and ft drivers, which use the
general definitions:

	#define FDUNIT(s)       dkunit(s)
	#define FDTYPE(s)       dktype(s)

instead of special ones:

	#define FDUNIT(s)	(((s)>>6)&03)
	#define FDTYPE(s)	((s)&077)

This special cases for fd require lots of extracode in MAKEDEV and
autoconf.c.

>Oh, and the existing dkmakeminor() doesn't handle unit > 31, though
>dkunit() does.  I presume nobody has 32 or more disks.  I haven't!

Some people do.  dkmakeminor() is little used.  The bug certainly
breaks devfs.  In the sd driver, it seems to break sdsetunit().

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704291200.WAA02048>