Re: An alternative way of populating /proc

From: Olaf Titz (olaf@bigred.inka.de)
Date: Wed Apr 12 2000 - 05:43:17 EST


> > create_proc_entries(NULL,
> > "test:{bar:{x:%d,y:%d,z:%d},foo:%f}",
> > &x, &y, &z, foo_fun);

Great.

> Thinking further about it, could the %'s become something
> else?

No, no, no. It's a format string for a printf-type function, so let it
remain as such. No need to include one more special idiosyncrasy, we
already have enough of them.

You can even have the compiler check the format string against the
arguments with some __attribute__ magic. This alone is reason enough
to keep it as shown above, printf-compatible.

Olaf

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