* Ned Ludd <[EMAIL PROTECTED]> schrieb:
> On Tue, 2006-05-30 at 14:05 +0200, Natanael Copa wrote:
> > On Tue, 2006-05-30 at 13:06 +0200, Enrico Weigelt wrote:
> > > Hi folks,
> > >
> > > JFYI: I've made an mii-tool single distribution, which is
> > > independent from the rest of the net-tools stuff.
> > >
> > > http://www.metux.de/articles/oss/mii-tool-1_9_1_1
> > >
> > > This is especially interesting for embedded systems with plenty
> > > of space.
>
> (embedded with plenty of space? kinda funny) If you had plenty of space
> then chances are you would be going the net-tools route.
ugh, seems there was a bit fallen over when I typed the mail ;-o
Of course: s/plenty/little/;
<snip>
> > It would be even more interesting if you could get it into busybox
> > and/or get it into portage.
>
> busybox absolutely seems the ideal place for cut out utils.
> mii-tool is a handy one also.
It would be good to have an simple API for writing such commandlets,
so that they can be easily built standalone or compiled in into
larger utils like busybox without changes in the source. Maybe a well
defined set of preprocessor symbols / macros could easily do the job.
For example:
#include "commandlet.h"
#ifdef CMDLET_MAIN_MODIFIER
CMDLET_MAIN_MODIFIER
#endif
int
#ifdef CMDLET_MAIN_NAME
CMDLET_MAIN_NAME
#else
main
#endif
(int argc, char** argv);
{
}
When built within some shell, we pass -DCMDLET_MAIN_NAME=...
so that the surrounding code (makefile ?) can control how the
main function is named (ie. foo_main() instead of main()).
By defining CMDLET_MAIN_MODIFIER we can add something to
the function declaration, ie "static".
...
cu
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service
phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: [EMAIL PROTECTED]
cellphone: +49 174 7066481
---------------------------------------------------------------------
-- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------
--
[email protected] mailing list