Re: An alternative way of populating /proc

From: bert hubert (ahu@ds9a.nl)
Date: Sat Apr 15 2000 - 10:43:57 EST


On Fri, Apr 14, 2000 at 05:03:04PM +0100, Matt Aubury wrote:

> The "create_proc_entries" suggestion has caused quite a bit of
> interest, so I'm hoping to make a proper patch this weekend. A bunch
> of issues have been raised (sorry to address them all in one place):

One benefit that has not been mentioned is that if the proc interface gains
features, or is reworked, we have a lot less code to change. The
create_proc_entries call abstracts proc away from our code, which is good as
well.

> * "%" is hard to generate with sprintf -- I think if you're
> sprintf'ing format strings this is probably the wrong interface to be
> using. This is only intended for the 90% (?) of cases which are really
> simple.

The 'easy things should be easy, hard things should be possible' paradigm.

> * No checking of the number of arguments -- This is just as bad, but
> we could solve this quite easily by making a NULL terminator
> mandatory. I'm in two minds about this -- comments?

A null terminator would be good. It is easy to code and catches some
problems.

> As I say, I'll try to put something better together over the
> weekend. I'd be very interested in any more thoughts people have.

Go for it, I'd say. By market it as an 'easy path', not obscuring or
displacing the 'hard path'.

Regards,

bert hubert

-- 
                       |              http://www.rent-a-nerd.nl
                       |                     - U N I X -
                       |          Inspice et cautus eris - D11T'95

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:26 EST