> I am fairly sure it is not it.

Your right. You commented out the scanleft function in the latest svn.

> I am fairly sure the breakage occurred in scanleft() function, here:
> 
> +               int match = strlen(str);
> -               int match;
> 
> ...
> 
> -               match = pmatch(str, s);
> 
> +               // chop off end if its '*'
> +               full = strrchr(str, '*');
> +               if (full && full != str)
> +                       match--;
> +
> +               // If str starts with '*' replace with s.
> +               if ((*str == '*') && strlen(s) >= match) {
> +                       full = xstrdup(s);
> +                       strncpy(full+strlen(s)-match+1, str+1, match-1);
> +               } else
> +                       full = xstrndup(str, match);
> +               match = strncmp(s, full, strlen(full));
> +               free(full);
> 
> Why do you need this change?
> 
> Can you provide an example which does not work if this
> change is reverted?

This fails.

runlevel=$(cat /proc/1/cmdline 2> /dev/null)
echo $runlevel                                  # init [2]
runlevel=${runlevel#* [}                       

echo "runlevel '$runlevel'"                     # Should be runlevel '2]'
                                                # we get runlevel 'init [2]'


_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to