clone_cleanup() doesn't

Ed Schouten ed at 80386.nl
Mon Aug 17 14:23:15 UTC 2009


Hi Andrew,

* Andrew Gallatin <gallatin at cs.duke.edu> wrote:
> Is there any reason you don't just |= in D_NEEDMINOR on first
> use of clone_create()?  By adding the requirement of this flag,
> you've gratuitously broken any 3rd party driver using clones,
> which has used the same API unchanged since 5.x

Over the last year I've made more rigorous changes to the kernel than
adding a new flag to make an undocumented kernel programming interface
work. Saying that the API has not been changed since 5.x isn't entirely
correct. Even the null.c source code of 5.x doesn't build on HEAD
anymore, because of d_maj, for example.

Even though we could probably change the code to |= D_NEEDMINOR, I'd
rather not. Having the flag there makes it very easy for me to figure
out which pieces of code still depend on clonelists. As Kostik pointed
out, you'd better use the cdevpriv interface if you need per-descriptor
data.

If it ever turns out we can live without clonelists, I am tempted to
remove unit numbers from character devices entirely, making si_drv0 the
integer counterpart of si_drv1 and si_drv2.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090817/3f364c02/attachment.pgp


More information about the freebsd-current mailing list