Re: An alternative way of populating /proc

From: George (greerga@nidhogg.ham.muohio.edu)
Date: Tue Apr 11 2000 - 18:10:08 EST


On Tue, 11 Apr 2000, Jan-Simon Pendry wrote:

>Richard Gooch wrote:
>>
>> Matthew Kirkwood writes:
>> > On Tue, 11 Apr 2000, Matt Aubury wrote:
>> >
>> > > create_proc_entries(NULL,
>> > > "test:{bar:{x:%d,y:%d,z:%d},foo:%f}",
>> > > &x, &y, &z, foo_fun);
>> >
>> > Thinking further about it, could the %'s become something
>> > else? It'd be nice to be able to make these strings with
>> > sprintf().
>>
>> No problem. Use "%%".
>>
>> Regards,
>>
>> Richard....
>
>i think the suggestion is that %% is ugly, and more important, prone
>to simply errors - the original doesn't need to use %. it could
>use something else, like $, @, & etc.

So keep the %'s and turn it into one that checks the arguments like
printk() does. Just from looking at the function call above, it appears
you may want it acting like scanf/printf anyway.

-George Greer

-
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:17 EST