Linux-kernel mailing list archive 2000-15,: Re: An alternative way of populating /proc

# Re: An alternative way of populating /proc

bert hubert (ahu@ds9a.nl)
Wed, 12 Apr 2000 11:55:28 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: bert hubert: "Re: EXT2 and BadBlock updating....."
- Previous message: Henning P. Schmiedehausen: "2.2.12-20/2.2.14/2.2.15pre17 Lockup on i820 Board with cyclades I/O board"

On Wed, Apr 12, 2000 at 12:46:25AM -0700, dean gaudet wrote:

> is the real concern codesize and you're totally willing to throw away
> type checking and such?

If you mess up, things will break the second you populate /proc. This might
also work to detect an excess of arguments, or a lack thereoff:

i = create_proc_entries(NULL, /* create in root /proc */
"test:{bar:{x:%d,y:%d,z:%d},foo-r:%f}",
&x, &y, &z, foo_fun, (void *)&somedata,
CREATE_PROC_TERMINATOR);

And insert a line like this in the right place:

BUG(va_arg(*args_ptr, int)!=CREATE_PROC_TERMINATOR);

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/

- Next message: bert hubert: "Re: EXT2 and BadBlock updating....."
- Previous message: Henning P. Schmiedehausen: "2.2.12-20/2.2.14/2.2.15pre17 Lockup on i820 Board with cyclades I/O board"