[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] little patch to display CMD line on error.
From: tomasz motylewski <T.Motylewski () bfad ! de>
Date: 2001-11-22 1:34:49
[Download RAW message or body]
I have found it useful to display the whole command line when busybox does not
understand some command - it makes much easier finding the problem in start-up
scripts.
The included patch does just that.
Best regards,
--
Tomasz Motylewski
diff -ur busybox-0.60.0/busybox.c busybox-0.60.0.1/busybox.c
--- 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);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic