[BusyBox] Re: [PATCH] Fix busybox head, tail to take old -n argument (was: Re: unable to run hello world on ARM920T processor) : hello world working

Hari v armharry at yahoo.com
Tue Jul 16 23:23:04 UTC 2002


 hi 
really thanks for your help. Its working!!!. i changed the "head -1" to head -n 1 in .java_wrapper file.
Now i am able run hello world!!!
I hope the problem is solved!!!. or is it required to apply patch to busybox. 
once again thanks ........
cheers
Hari
  dank at kegel.com wrote: Hari v wrote:
> thanks. yes i enabled the features in Config.h. 
> Now the earlier messages like unset is missing. 
> But how to remove head:invalid option -- 1 

Apply the following patch, perhaps? That should
let the Java startup script do its head -1 successfully.
- Dan--- busybox-0.60.2/tail.c.orig Tue Jul 16 22:32:00 2002
+++ busybox-0.60.2/tail.c Tue Jul 16 22:46:19 2002
@@ -22,6 +22,7 @@
*/


+#include 
#include 
#include 
#include 
@@ -67,6 +68,13 @@
int *fds, nfiles = 0, status = EXIT_SUCCESS, nread, nwrite, seen = 0;
char *s, *start, *end, buf[BUFSIZ];
int i, opt;
+
+ /* Support traditional -%d option if first; needed by many scripts */
+ if ((argc > 1) && (argv[1][0] == '-') && isdigit(argv[1][1])) {
+ count = atoi(argv[1]+1);
+ argc--;
+ argv++;
+ }

while ((opt = getopt(argc, argv, "c:fhn:q:s:v")) > 0) {
switch (opt) {
--- busybox-0.60.2/head.c.orig Tue Jul 16 22:49:23 2002
+++ busybox-0.60.2/head.c Tue Jul 16 22:50:07 2002
@@ -21,6 +21,7 @@
*
*/

+#include 
#include 
#include 
#include 
@@ -46,6 +47,13 @@
{
FILE *fp;
int need_headers, opt, len = 10, status = EXIT_SUCCESS;
+
+ /* Support traditional -%d option if first; needed by many scripts */
+ if ((argc > 1) && (argv[1][0] == '-') && isdigit(argv[1][1])) {
+ len = atoi(argv[1]+1);
+ argc--;
+ argv++;
+ }

/* parse argv[] */
while ((opt = getopt(argc, argv, "n:")) > 0) {



---------------------------------
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20020716/88a42c19/attachment-0001.htm 


More information about the busybox mailing list