[Lcdproc] Update to lcdproc-iface
Peter Marschall
peter@adpm.de
Sun May 7 17:40:01 2006
Hi,
On Sunday, 7. May 2006 16:00, Markus Dolze wrote:
> here is an update to the network stats code. Changes:
>
> Introduce a generic value conversion functions in util.c. sprintf_memory
> has been rewritten to use it.
Cool !!!
I have thought of something similar myself last week but was too lazy to do
it.
> Remove code for running iface.c as a standalone client.
> Replace fprintf() and perror() calls in iface.c with report().
> Rewrite the value formatting code to use new value conversion from util.c.
Thanks for cleaning up further.
> The next step will be to move the machine dependend part of the network
> statistics gathering part into corresponding machine_* files. We already
> have Linux and FreeBSD.
>
> I am wondering what will be the best way to do that without break building
> on other systems before we have someone to port the code to that platform.
>
> Add a dummy implementation returning an error?
> Add some "autodetection" to configure?
What about simply #ifdef'ing the respective lines in lcdproc/main.c
(i.e. the sequence[] line and the line in the help text) ?
IMHO this should be sufficient to disable the iface screens.
Another posibility would be to #ifdef the iface screen display routine to
simply return when not Linux or FreeBSD.
Thanks
Peter
--
Peter Marschall
peter@adpm.de