moving buffer allocation schemes from busybox.h to libbb.h

Bernhard Fischer rep.nop at aon.at
Sat Apr 1 11:08:35 UTC 2006


On Sat, Apr 01, 2006 at 05:40:22AM -0500, Robert P. J. Day wrote:
>On Sat, 1 Apr 2006, Bernhard Fischer wrote:
>
>> On Fri, Mar 31, 2006 at 07:24:16PM -0500, Rob Landley wrote:
>> >On Friday 31 March 2006 5:40 pm, Bernhard Fischer wrote:
>> >> Hi,
>> >>
>> >> I want to move the buffer allocation schemes from busybox.h to libbb.h.
>> >>
>> >> That way, we could use the RESERVE_CONFIG_{U,}BUFFER /
>> >> RELEASE_CONFIG_BUFFER also in libbb.
>> >
>> >You mean so code in libbb can use it?  Sounds reasonable.
>> >
>> >> The following files will have to be changed to include the correct .h
>> >> (libbb.h instead of busybox.h):
>> >> $ grep -l busybox.h libbb/*
>> >> libbb/bb_echo.c
>> >> libbb/copyfd.c
>> >> libbb/copy_file.c
>> >> libbb/get_terminal_width_height.c
>> >> libbb/md5.c
>> >> libbb/messages.c
>> >> libbb/sha1.c
>> >> libbb/xgetlarg.c
>> >
>> >Actually busybox.h includes libbb.h, but in general libbb/*.c
>> >should probably include libbb.h rather than busybox.h anyway.
>>
>> Ok. So i'll do that unless somebody has a reasonable different
>> proposal.
>
>not that i want to rub this in just a little but, given that
>"busybox.h" already includes "libbb.h", why not just make every single
>source file include "busybox.h"?  it will certainly work, right?  and

It would techically work, yes.

>that's the rationale i've been hearing for the last day or so -- it's
>easy, trying to clean up the header files is just addressing
>theoretical problems that don't really exist, etc, etc.
>
>so why the sudden desire to have stuff in libbb/*.c include the more
>appropriate libbb.h rather than the more all-encompassing busybox.h?
>exactly what problem is this addressing?  hmmmmmmm?
>
>rday
>
>p.s.  why, yes, i *am* just a little pissed that i got slapped around
>so soundly for a suggestion that seems to be getting such a friendly
>reception now that *someone* *else* has made it.

Not that this would be of any relevance, but i've made the suggestion
above (RESERVE_CONFIG stuff) more than a year ago, and i'm sure that
i'm not the first one to generally note this.

That said, we're talking about an internal header, which is something
different than system headers. If you feel like cleaning them up, then
submit a clean series of incremental patches and it will eventually be
applied by someone who actually followed that thread and feels like it's
something we actually want to have and to delve into now. I'm personally
not really interested in it ATM.
Something whorthwhile would be to make the udhcp arping() optional and
use an improved arping_main() if udhcpd is built IN_BUSYBOX ...
The TODO lists some stuff which would be nice to have, too, so if you're
looking for something to do.. :)

friendly,
Bernhard



More information about the busybox mailing list