From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1FlWVE-0007uu-Ce for garchives@archives.gentoo.org; Wed, 31 May 2006 19:37:12 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k4VJYpa8029984; Wed, 31 May 2006 19:34:51 GMT Received: from agamemnon.metux.de (agamemnon.metux.de [80.148.38.40]) by robin.gentoo.org (8.13.6/8.13.6) with ESMTP id k4VJYoTk016829 for ; Wed, 31 May 2006 19:34:50 GMT Received: from metux.de ([192.168.254.2]) by agamemnon.metux.de (8.13.1/8.12.10) with ESMTP id k4VJYfYO016900 for ; Wed, 31 May 2006 21:34:42 +0200 Received: (from weigelt@localhost) by metux.de (8.12.10/8.12.10) id k4VJYmKs002765 for gentoo-embedded@lists.gentoo.org; Wed, 31 May 2006 21:34:48 +0200 Date: Wed, 31 May 2006 21:34:48 +0200 From: Enrico Weigelt To: gentoo-embedded@lists.gentoo.org Subject: Re: [gentoo-embedded] mii-tool single distribution Message-ID: <20060531193448.GA31141@nibiru.local> References: <20060530110632.GA25711@nibiru.local> <1148990750.30430.5.camel@localhost> <1148992612.28488.26.camel@localhost> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1148992612.28488.26.camel@localhost> User-Agent: Mutt/1.4.1i X-Archives-Salt: 955f5b36-fbd6-46ca-9766-a5aa9babcb73 X-Archives-Hash: dfb279904648e5be0ac20a5dccbb2921 * Ned Ludd 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/; > > 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: contact@metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -- gentoo-embedded@gentoo.org mailing list