Subject: Re: turn bpf device into a cloner
To: Christos Zoulas <christos@zoulas.com>
From: Jeff Rizzo <riz@boogers.sf.ca.us>
List: tech-net
Date: 11/29/2004 15:59:00
Christos Zoulas wrote:

>
>So I went through and cleaned up a bit the cloner interface:
>1. made fileops const
>2. added 2 new negative errno's to `officially' support the cloning hack:
>	EDUPFD (used to overload ENODEV)
>	EMOVEFD (used to overload ENXIO)
>3. created an fdclone() function to encapsulate the operations needed for
>   EMOVEFD, and made all cloners use it.
>4. Centralized the local noop/badop fileops functions to:
>   fnullop_fcntl, fnullop_poll, fnullop_kqfilter, fbadop_stat
>5. included the bpf cloning change with this patch.
>6. there were 2 cases where ENXIO was returned where ENODEV should have
>   been returned. I fixed changed them.
>
>If I don't hear any complaints, I'll commit that soon.
>
>  
>

I like it - I think it's a step forward in (at least) being able to come 
to the code and quickly understand what's going on, which is a situation 
I recently found myself with respect to cloning devices.  Only 
suggestion I would make - a man page for fdclone() ?

+j