Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Jun 1997 16:00:36 -0400
From:      Brian McGovern <bmcgover@cisco.com>
To:        questions@freebsd.org
Subject:   How do I make large minor numbers?
Message-ID:  <199706042000.QAA00610@bmcgover-pc.cisco.com>

next in thread | raw e-mail | index | archive | help
Sounds a bit redundant, but... :)

I'm trying to create some minor numbers for a piece of hardware that
could have potentially as many as 128 or 256 ports, with n number of
them being in a machine (4 is a realistic number). Given that an average
tty device needs call in, call out, initial state in, and initial state out,
lock state in, and lock state out, I want to do something like this:

lower 8 bits    	- port number
9th bit			- Call In/Call out flag
10th bit		- Initial state flag
11th bit		- Lock state flag
12-15th bit		- Board number

I see that the minor function is supposed to return a signed integer, so this
should be (?) possible? I also see devices in /dev with rather large minor
numbers. However, when I try creating a node with mknod for something like:

mknod cuacA01 c 48 257

it dies, saying that the major or minor number is too large (I tracked it,
and its the minor number). Is there any way around this? Or am I going to
be stuck with only 255 minor numbers (which is going to be a real pain!).

	-Brian



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