Hi, On Fri, Mar 28, 2008 at 11:21:42AM +0100, Carl Fredrik Hammar wrote:
> It seems to me that many (most?) of the translators will be /very/ > simple. For uptime, cpuinfo, cmdline etc. their task boils down to > gather some info and produce a string using with asprintf(). > > This is much like the hello translator, except with a parameterized > string. For something so simple the hello translator is still ~200 > lines of code and I suspect it will get tedious and error-prone to > write several such translators when the actual functionality can be > summed up in 30 lines or so. I totally agree that it would be desirable to have a library that help writing such *really* trivial translators. (libtrivtrivfs?... ;-) ) But as you mention yourself, this is not at all specific to proc; there are totally different kinds of translators that could use such a library just as well. I think this is out of scope for the procfs project. Maybe some followup project... -antrik-