[RFC, PATCH] new applet resize #2

Rob Landley rob at landley.net
Fri Sep 22 03:25:04 UTC 2006


On Thursday 21 September 2006 5:45 pm, Bernhard Fischer wrote:
> >And, what is this for?
> 
> It provides for easily setting the TIOS timeout in the NITPICK sectio of
> libbb library tuning, i guess.

CONFIG_NITPICK is for minor size optimizations that are too trivial to bother 
most people with.  It's the next step up from going in and twiddling the 
source code yourself.

> It's ment as a suggestion to emit the string conditionally in case
> somebody wants to preserve the behaviour of the bloated normal binary
> that is not in busybox.

The normal binary?  (Rummage...)  Ah, so there is.  Part of X from _1984_.  
Wow.

Ok, preserving the behavior of that strikes me as a good thing.  I guess that 
means I should take another look at the patch...

+#define RESIZE_TIOS_TIMEOUT 100 /* in deciseconds */
+#if defined(RESIZE_TIOS_TIMEOUT) && (RESIZE_TIOS_TIMEOUT > 0)

What on _earth_?

+int resize_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv) {

The curly bracket goes on the start of the next line.

Have we been using ATTRIBUTE_UNUSED on argc and argv anywhere else?  Is this 
really needed?  We've never appled ATTRIBUTE_UNUSED to argc and argv that I'm 
aware of.  If coreutils/sync.c hasn't been using this (ever), and no I'm not 
recommending adding it.  Why is that there?

> ATTRIBUTE_UNUSED just sets TREE_NO_WARNING (or however it's spelled) so
> you don't get warnings about unused parameters.

I am already not getting warnings about unused parameters.  Why are you 
getting them?

> Unfortunately we 
> currently cannot say the proper (and size-saving!)
> int my_applet_main(void){} due to our macros being stubborn.

I've been pondering switching argv and argc to globals for most of a year (I 
suggested it on the list before), but lemme get bbsh into reasonable shape 
first.

> Easy to fix (i have a patch here at home which did this, against an
> ancient version) but i'm not convinced if Rob likes this or not as it
> would make the applet dispatch-table filler macros even less
> comprehensible.
> 
> Rob?
> Mind if Tito or i do this, mid-term?

Do which?  What specifically are you proposing?

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list