acpid in 1.16.2 doesn't build on SLES 10.

Rob Landley rob at landley.net
Tue Jul 20 01:19:00 UTC 2010


On Sunday 18 July 2010 15:50:14 Denys Vlasenko wrote:
> On Friday 16 July 2010 15:14, Rob Landley wrote:
> > It builds and boots (on i686, at least).  The shell prompt is a bit
> > screwed up, though:
> >
> >   (i686:1) \w \$
> >
> > CONFIG_FEATURE_EDITING_FANCY_PROMPT defaults to off,
>
> Fixed, busybox-1.17.0-build_system.patch is updated.

Testing...

Well, it built.  (With CONFIG_DESKTOP caveats noted last message.)

I need to fix up netcat a bit for the native-build.sh stuff, though.  Might do 
that tonight.

By the way, if you're really worried about incompatability between nc and 
netcat, why not just call the busybox one "netcat" and separate it completely 
from the nc-110 version?  Then when we get the missing features filled out, we 
can add an "alias netcat to nc" sub-option.  (Just a thought...)

#if 0  /* nc-1.10 does not do this (without -v) */

If netcat created a random port and doesn't give any indication of _which_ 
port it's listening on, then you can't _use_ the port because you have no 
address to connect to.  Note that it only does this in listen mode, when it's 
waiting for an incoming connection which some other program must provide, and 
must provide using an address only netcat knows unless you're going to use 
lsof or something.  So if the nc-1.10 behavior really is broken that way, then 
emulating it is useless.  (If this is not the case, please explain.)

 accept_again:

Why do you indent function labels?

Oh wow, I really really really miss the toybox command line option parsing 
functionality...

Ok, toybox was doing this for -s:

// Translate x.x.x.x numeric IPv4 address, or else DNS lookup an IPv4 name.
static void lookup_name(char *name, uint32_t *result)
{
        struct hostent *hostbyname;

        hostbyname = gethostbyname(name);
        if (!hostbyname) error_exit("no host '%s'", name);
        *result = *(uint32_t *)*hostbyname->h_addr_list;
}

That's 9 lines long including the blank line and the comment.  Instead, it 
looks like the busybox way is to call str2sockaddr(), which is 134 lines long.  
Right, I'm just going to remove -s and have my use case unsafely bind to all 
addresses for the moment...

> > and for some reason that's
> > in the busybox library tuning menu instead of the shell menu.
>
> Because not only shells can use line editing. It's a generic thing.

It's still non-obvious.  Not sure the best way to handle it...

> http://busybox.net/downloads/fixes-1.17.0/busybox-1.17.0-ask_terminal.patch
>
> This patch will make e.g. hush to query window width using ESC [ 6 n
> only if ioctl(TIOCGWINSZ) fails or returns bogus value of 0.
>
> You need to not only confirm that it builds, but also try it
> on the serial line and let me know whether it actually
> does the trick. It may fail to work if ctl(TIOCGWINSZ) on the serial
> line lies, that is, returns some invented nonzero width and height
> and doesnt indicate the error.

Ok, let's see....

Nope, vi still thinks it's 80x25.  (Which is odd because 
CONFIG_FEATURE_VI_ASK_TERMINAL is enabled.)

Let's see...  the ioctl is returning 0 (success) but leaving win.ws_row and 
win.ws_col at 0 if they were initialized to 0.  And your code is washing that 
through:

static int wh_helper(int value, int def_val, const char *env_name, int *err)
{
        if (value == 0) {
                char *s = getenv(env_name);
                if (s) {
                        value = atoi(s);
                        /* If LINES/COLUMNS are set, pretent that there is
                         * no error getting w/h, this prevents some ugly
                         * cursor tricks by our callers */
                        *err = 0;
                }
        }
        if (value <= 1 || value >= 30000)
                value = def_val;
        return value;
}

Which is helpfully overwriting those 0 values with a default value.

> > Hmmm...
> >
> > AAAAAHHHH!!!  #IFDEF SALAD!  My eyes!
> >
> > Ahem: libbb/lineedit.c needs to be <strike>cleansed with fire</strike>
> > cleaned up a bit.  With fire.
>
> Sure it does.

Lemme get aboriginal 1.0 out, then I might have some more time...

Rob
-- 
GPLv3: as worthy a successor as The Phantom Meanace, as timely as Duke Nukem 
Forever, and as welcome as New Coke.


More information about the busybox mailing list