[BusyBox] Re: ifconfig: Clean up. [PATCH]

Rob Landley rob at landley.net
Mon Jul 25 08:03:39 UTC 2005


On Monday 25 July 2005 01:24, Tito wrote:
> On Monday 25 July 2005 06:14, Erik Andersen wrote:
> > On Sun Jul 24, 2005 at 08:50:39PM -0500, Rob Landley wrote:
> > > On Sunday 24 July 2005 12:32, Shaun Jackman wrote:
> > > Opinions?
> >
> > I think we need to have a #define in the busybox header file
> > such as:
> >
> >     #ifdef CONFIG_FEATURE_CLEAN_UP
> >     # define #do_cleanup 1
> >     #else
> >     # define #do_cleanup 0
> >     #endif
> >
> > and then applet code will simply do:
> >
> >     if (do_cleanup)
> >     {
> >  // Stuff
> >     }
> >
> > such that the entire block of code will be pruned by gcc when
> > do_cleanup is 0...  A similar approach could also be used to
> > remove a number of other #defines.
> >
> >  -Erik
>
> Hi, i personally am all for the macro solution for just
> one simple reason:
>
> macro = 1 line of code
>
> define = at least (if correctly indented) 3 lines.

  if(do_cleanup) close(fd);

Rob



More information about the busybox mailing list