[BusyBox] Re: how to figure out old config

Benjamin Mertke b.mertke at bfad.de
Thu Jan 22 15:44:50 UTC 2004


On Thu, 2004-01-22 at 16:06, Jan-Marc Pilawa wrote:
> >> Question: Is there any way to find out which config options were used
> >> to compile a busybox-binary?
> >
> >You can see which applets were compiled in just by running busybox, but
> >there is no easy way of knowing what options were used.
> 
> Ok, thanks a lot. -So I will start finding out what caused the syntax
> error right at the begin of the first scripts. If i can catch the first
> error(s), debug will be easier.
> 
Long time ago we have sendet a patch to get a rid on a such
behavier. This patch was telling you how busybox was called.
It was telling you for example: "Busybox was called as: ifconfig"
So one was able to know which applet is crashing/not working.

Maybe this time somebody will apply this patch to busybox.
It was writen for version 0.60.0. But I think it will still work.

--- busybox-0.60.0/busybox.c    Thu Jun 21 06:56:24 2001
+++ busybox-0.60.0.1/busybox.c  Tue Aug 21 11:50:42 2001
@@ -96,6 +96,7 @@
 int busybox_main(int argc, char **argv)
 {
        int col = 0, len, i;
+       int orig_argc=argc;

 #ifdef BB_FEATURE_INSTALLER
        /*
@@ -151,7 +152,11 @@
                                col = 0;
                        }
                }
-               fprintf(stderr, "\n\n");
+               fprintf(stderr, "\n\nBusybox was called as:\n");
+               for(i=0; i<orig_argc; i++) {
+                       fprintf(stderr, "%s ", argv[i]);
+               }
+               fprintf(stderr, "\n");
                exit(0);
        }





More information about the busybox mailing list