From vapier at gentoo.org Wed Aug 1 02:23:12 2007 From: vapier at gentoo.org (Mike Frysinger) Date: Wed, 1 Aug 2007 05:23:12 -0400 Subject: BusyBox poweroff problem with SMP kernel In-Reply-To: References: Message-ID: <200708010523.12629.vapier@gentoo.org> On Tuesday 31 July 2007, Zhiming Zhou wrote: > So, I want to know is there someone successfully use busybox to poweroff > computer with SMP kernel? And what is the possible reason of my problem? sounds like a kernel problem, not a busybox problem -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://busybox.net/lists/busybox/attachments/20070801/31c34880/attachment.pgp From strange at nsk.no-ip.org Wed Aug 1 06:09:14 2007 From: strange at nsk.no-ip.org (Luciano Rocha) Date: Wed, 1 Aug 2007 14:09:14 +0100 Subject: BusyBox poweroff problem with SMP kernel In-Reply-To: References: Message-ID: <20070801130913.GA10643@bit.office.eurotux.com> On Wed, Aug 01, 2007 at 11:08:28AM +0800, Zhiming Zhou wrote: > But while the system run in computer with multiple processors; system > stopped while "Power down system" was printed, it seems out of busybox, and > acpi_power_off is not called. > > And if I compiled my linux kernel without CONFIG_SMP configed, and use the > same busybox root file system, there was none poweroff problems in my > system. > > ------------------------------------------------------------------------------ > So, I want to know is there someone successfully use busybox to poweroff > computer with SMP kernel? And what is the possible reason of my problem? That's a kernel problem, not a busybox one. If you're using APM, the kernel disables it at boot when it's running with more than one processor. You can force it on, only for powering-off, with the option apm=power-off to the kernel. If you're using ACPI, then I don't know why it isn't powering down. It could be because of an older BIOS, blacklisted when in SMP mode. But then you can try activating apm like above. -- lfr 0/0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://busybox.net/lists/busybox/attachments/20070801/1d013e64/attachment.pgp From tefyxcegmkow at spammotel.com Wed Aug 1 08:07:54 2007 From: tefyxcegmkow at spammotel.com (wimpunk) Date: Wed, 01 Aug 2007 17:07:54 +0200 Subject: reboot/poweroff/halt commands not working In-Reply-To: <1185560429.3596.3.camel@localhost> References: <1185560429.3596.3.camel@localhost> Message-ID: <47k6o4-c5c.ln1@l29.abba.lin.vlaanderen.be> Dallas Clement wrote: > I'm using 1.6.1 and none of these commands seem to work all by > themselves. If I provide the -f option, they all work just fine. I'm > not sure if this is a regression problem or it has always been this way. > > I thought things were working properly in previous versions. I'm pretty > sure I did not have to supply the -f option. I have the same problem with 1.5.* and 1.4.2. It fails on ARM but it works on i386. wimpunk. From tefyxcegmkow at spammotel.com Wed Aug 1 08:13:28 2007 From: tefyxcegmkow at spammotel.com (wimpunk) Date: Wed, 01 Aug 2007 17:13:28 +0200 Subject: BusyBox poweroff problem with SMP kernel In-Reply-To: References: Message-ID: Zhiming Zhou wrote: > I compiled a smp linux kernel to support multiple processors, and use > busybox 1.6.1 as root filesystem. > The compiled linux system can be successfully started, and busybox ash > is started, while I typed "poweroff" in ash, > > If the system run in computer with single processor; system stopped > while "Sending SIGTERM to all processes" was printed, > and I found in busybox source directory/init/init.c, function > shutdown_system(void): > > message(L_CONSOLE | L_LOG, "Sending SIG%s to all processes", "TERM"); > kill(-1, SIGTERM); > > but kill function can not be proceeded, and system stopped. > > But while the system run in computer with multiple processors; system > stopped while "Power down system" was printed, it seems out of busybox, > and acpi_power_off is not called. > > And if I compiled my linux kernel without CONFIG_SMP configed, and use > the same busybox root file system, there was none poweroff problems in > my system. > > ------------------------------------------------------------------------------ > > So, I want to know is there someone successfully use busybox to poweroff > computer with SMP kernel? And what is the possible reason of my problem? > > Thanks > > Referring to a previous post: try the -f option. I'm just curious if that one works... wimpunk. From vrashtchi at yahoo.com Wed Aug 1 14:59:25 2007 From: vrashtchi at yahoo.com (vahid rashtchi) Date: Wed, 1 Aug 2007 14:59:25 -0700 (PDT) Subject: I/O difficulties Message-ID: <867947.64675.qm@web53106.mail.re2.yahoo.com> I am using KB9202b evaluation board for developing a real time control system project. I am using c++ for programming and use buildroot compiler.I have difficulties in input /output operation and configuring interupt routin under busybox. I can't perform I/O operation and see "permission denied" error. Does anyone have sample source code for these propose ? with best regard V.Rashtchi --------------------------------- Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://busybox.net/lists/busybox/attachments/20070801/20863f8c/attachment.htm From vda.linux at googlemail.com Wed Aug 1 15:49:19 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Wed, 1 Aug 2007 23:49:19 +0100 Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <866511.5093.qm@web62501.mail.re1.yahoo.com> References: <866511.5093.qm@web62501.mail.re1.yahoo.com> Message-ID: <200708012349.19564.vda.linux@googlemail.com> On Tuesday 24 July 2007 10:54, Alex Landau wrote: > Hi, > > The attached patch fixes a compilation error: > undefined reference to `_BUG_bb_daemonize_is_unavailable_on_nommu > and makes start-stop-daemon usable on no-MMU by using bb_daemonize only if BB_MMU and > emulating it if !BB_MMU. > > This is a bit hackish, since after vfork(), the child does all the work and exec()s the > daemon, rather than execing right away, as the vfork paradigma says. Still I think this > is better than re-execing start-stop-daemon and only then execing the daemon itself since > this approach requires removing the -b (or --background) arguments from the command line, > which is not fun (what if there are several -b options? etc.), For the record: no, you don't need that. You can just re-exec with entire command line intact. -b option will be seen again, and re-exec will be seemingly done again... but second re-exec will actually NOT be done because of this: void forkexit_or_rexec(char **argv) { pid_t pid; /* Maybe we are already re-execed and come here again? */ if (re_execed) <=================== return; <=================== The magic is in re_execed variable. grep for it. BTW does current svn work for you? -- vda From vda.linux at googlemail.com Wed Aug 1 16:21:26 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 2 Aug 2007 00:21:26 +0100 Subject: editors/patch.c is broken In-Reply-To: References: Message-ID: <200708020021.26709.vda.linux@googlemail.com> On Tuesday 31 July 2007 20:30, Nguyen Thai Ngoc Duy wrote: > src/dest file names are read by xmalloc_fgets which include trailing > \n characters. Therefore patch either reads from wrong source file or > write to wrong destination file. The attached patch should fix it. > I'm not sure about the rest of xmalloc_fgets used in patch, though. Applied, thanks -- vda From dallas.a.clement at gmail.com Wed Aug 1 19:35:52 2007 From: dallas.a.clement at gmail.com (Dallas Clement) Date: Wed, 1 Aug 2007 21:35:52 -0500 Subject: reboot/poweroff/halt commands not working In-Reply-To: <47k6o4-c5c.ln1@l29.abba.lin.vlaanderen.be> References: <1185560429.3596.3.camel@localhost> <47k6o4-c5c.ln1@l29.abba.lin.vlaanderen.be> Message-ID: <46b1430a.38f8220a.3e1b.721a@mx.google.com> It's failing on a i686 for me. Version 1.6.1. Haven't retried 1.6.0, but as far as I recall it was working in that version. > -----Original Message----- > From: busybox-bounces at busybox.net [mailto:busybox-bounces at busybox.net] > On Behalf Of wimpunk > Sent: Wednesday, August 01, 2007 10:08 AM > To: busybox at busybox.net > Subject: Re: reboot/poweroff/halt commands not working > > Dallas Clement wrote: > > I'm using 1.6.1 and none of these commands seem to work all by > > themselves. If I provide the -f option, they all work just fine. > I'm > > not sure if this is a regression problem or it has always been this > way. > > > > I thought things were working properly in previous versions. I'm > pretty > > sure I did not have to supply the -f option. > > I have the same problem with 1.5.* and 1.4.2. It fails on ARM but it > works on i386. > > wimpunk. > > _______________________________________________ > busybox mailing list > busybox at busybox.net > http://busybox.net/cgi-bin/mailman/listinfo/busybox From vapier at gentoo.org Wed Aug 1 21:18:04 2007 From: vapier at gentoo.org (Mike Frysinger) Date: Thu, 2 Aug 2007 00:18:04 -0400 Subject: I/O difficulties In-Reply-To: <867947.64675.qm@web53106.mail.re2.yahoo.com> References: <867947.64675.qm@web53106.mail.re2.yahoo.com> Message-ID: <200708020018.05315.vapier@gentoo.org> On Wednesday 01 August 2007, vahid rashtchi wrote: > I am using KB9202b evaluation board for developing a real time control > system project. I am using c++ for programming and use buildroot > compiler.I have difficulties in input /output operation and configuring > interupt routin under busybox. I can't perform I/O operation and see > "permission denied" error. Does anyone have sample source code for these > propose ? this question isnt appropriate for the busybox lists. please try a generic embedded forum (like ucdot.org) or the kernel mailing list for whatever architecture you're developing for. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://busybox.net/lists/busybox/attachments/20070802/1b8111b2/attachment.pgp From natanael.copa at gmail.com Wed Aug 1 21:42:46 2007 From: natanael.copa at gmail.com (Natanael copa) Date: Thu, 02 Aug 2007 06:42:46 +0200 Subject: [PATCH] sendmail/ssmtp applet Message-ID: <1186029766.14577.2.camel@nat-desktop> Hi, Here is a crude sendmail applet based on ssmtp: http://dev.alpinelinux.org/~ncopa/busybox-initial-sendmail.patch (It is bigger than 40k so I was not allowed to post it on the mailing list) It is an initial version but I post it anyway so experienced busybox'ers can give hits and give the opportunity for volunteers (with more time than me) to continue work on it. Some issues I saw while preparing it: * fix Copyright * fix include files * we will probably never want ssl support so that part can simply be cutted * argument parsing could use getopt32 * unused options could be cutted. Maybe have an config option for sendmail compatibility. * bool_t should be bool * many of the global bool vars can be compressed into a "flags" variable where every bool represent a bit. * base64 code can probably be reuse from previous busybox code. * md5 auth? * logging could be handled with something from libbb? I'm sure there are more things. The size is not too bad anyway and it can only become smaller from here :-) I do intend to fix those things (if there are enough interest) but by posting it here early i give interested ppl a chance to give a hand. function old new delta ssmtp - 2962 +2962 sendmail_main - 1160 +1160 die - 565 +565 header_parse - 545 +545 smtp_write - 352 +352 rcpt_parse - 334 +334 smtp_open - 240 +240 log_event - 223 +223 to64frombits - 222 +222 TimeoutJmpBuf - 200 +200 smtp_read - 183 +183 paq - 161 +161 append_domain - 152 +152 addr_parse - 141 +141 packed_usage 318 446 +128 standardise - 90 +90 rcpt_remap - 84 +84 base64digits - 65 +65 hostname - 64 +64 strip_post_ws - 37 +37 strip_pre_ws - 32 +32 arpadate - 32 +32 smtp_okay - 20 +20 handler - 19 +19 rcpt_list - 16 +16 headers - 16 +16 applets 48 64 +16 uad - 8 +8 static.stdin@@GLIBC_2 - 8 +8 rt - 8 +8 root - 8 +8 minus_f - 8 +8 minus_F - 8 +8 mailhost - 8 +8 ht - 8 +8 gecos - 8 +8 from - 8 +8 auth_user - 8 +8 auth_pass - 8 +8 auth_method - 8 +8 static.Version - 7 +7 use_starttls - 4 +4 port - 4 +4 override_from - 4 +4 minus_v - 4 +4 minus_t - 4 +4 log_level - 4 +4 have_from - 4 +4 have_date - 4 +4 ------------------------------------------------------------------------------ (add/remove: 47/0 grow/shrink: 2/0 up/down: 8202/0) Total: 8202 bytes text data bss dec hex filename 14827 816 8280 23923 5d73 busybox_old 27764 1155 8728 37647 930f busybox_unstripped Natanael Copa From landau_alex at yahoo.com Wed Aug 1 23:26:58 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Wed, 1 Aug 2007 23:26:58 -0700 (PDT) Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <1158166a0707311000w6a977564ncfd8c2f23e666594@mail.gmail.com> Message-ID: <899460.68656.qm@web62503.mail.re1.yahoo.com> --- Denis Vlasenko wrote: > Applied with some other minor changes added, please check svn > and yell if you see something bad. > > vda > Yelling! I found several problems, the attached patch fixes them. 1. pid_is_exec(): you changed the return to (~n) from something akin to (!n). This works fine if n==0, but then n!=0, the returned value is also non-zero, and it breaks the calling code. 2. When vfork()ing, the parent should exit(0) and not return(0), since the child has run quite some time and may have changed the return address in stack. So, no returns in the parent, only function calls. Added a comment about that. Better safe than sorry. 3. After vfork(), the check of (pid==0) to see if I'm the parent is wrong. It should be (pid!=0). 4. Added a setsid() call just before daemonize_or_rexec. Alex ____________________________________________________________________________________ Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz -------------- next part -------------- A non-text attachment was scrubbed... Name: start-stop-daemon-round2.patch Type: text/x-patch Size: 979 bytes Desc: 660604078-start-stop-daemon-round2.patch Url : http://busybox.net/lists/busybox/attachments/20070801/0c02bdcd/attachment.bin From vapier at gentoo.org Wed Aug 1 23:45:08 2007 From: vapier at gentoo.org (Mike Frysinger) Date: Thu, 2 Aug 2007 02:45:08 -0400 Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <899460.68656.qm@web62503.mail.re1.yahoo.com> References: <899460.68656.qm@web62503.mail.re1.yahoo.com> Message-ID: <200708020245.10367.vapier@gentoo.org> On Thursday 02 August 2007, Alex Landau wrote: > +???????????????if (pid != 0) /* parent */ > +???????????????????????exit(0); /* the child may have changed the stack, > so no return possible, only function calls */ /* child */ i havent read the code, but gut feeling says that should be _exit(0) ... or do i need to read the code ? :) -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://busybox.net/lists/busybox/attachments/20070802/9403e96b/attachment.pgp From landau_alex at yahoo.com Thu Aug 2 00:48:10 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Thu, 2 Aug 2007 00:48:10 -0700 (PDT) Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <200708020245.10367.vapier@gentoo.org> Message-ID: <868676.99832.qm@web62505.mail.re1.yahoo.com> --- Mike Frysinger wrote: > On Thursday 02 August 2007, Alex Landau wrote: > > + if (pid != 0) /* parent */ > > + exit(0); /* the child may have changed the stack, > > so no return possible, only function calls */ /* child */ > > i havent read the code, but gut feeling says that should be _exit(0) ... or do > i need to read the code ? :) > -mike > You do need to read the code :-) It's the parent who runs exit(), not the child, so it should be exit() and not _exit(). The child merely execv()s. Alex ____________________________________________________________________________________ Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz From Devinim.SOLEN at motiontrue.com Thu Aug 2 01:25:14 2007 From: Devinim.SOLEN at motiontrue.com (=?iso-8859-9?Q?Devinim_=DE=D6LEN?=) Date: Thu, 2 Aug 2007 11:25:14 +0300 Subject: NFS Support Message-ID: <7D23D3548EC1874CBA41E02F76963A614B36EB8B30@MTEX01.motiontrue.entp> Hi; I am using BusyBox version 1.6.1 and have a NFS mounting problem. When I try to mount NFS external point getting this error; mount -t nfs 192.168.10.64:/ /mnt mount: mounting 192.168.10.64:/ on /mnt failed can anybody help ? Best Regards Devinim SOLEN -------------- next part -------------- An HTML attachment was scrubbed... URL: http://busybox.net/lists/busybox/attachments/20070802/6ba1bf43/attachment.htm From vda.linux at googlemail.com Thu Aug 2 03:03:31 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 2 Aug 2007 11:03:31 +0100 Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <868676.99832.qm@web62505.mail.re1.yahoo.com> References: <200708020245.10367.vapier@gentoo.org> <868676.99832.qm@web62505.mail.re1.yahoo.com> Message-ID: <1158166a0708020303k3c00b435qd72a8c3e00d0b9a0@mail.gmail.com> On 8/2/07, Alex Landau wrote: > --- Mike Frysinger wrote: > > > On Thursday 02 August 2007, Alex Landau wrote: > > > + if (pid != 0) /* parent */ > > > + exit(0); /* the child may have changed the stack, > > > so no return possible, only function calls */ /* child */ > > > > i havent read the code, but gut feeling says that should be _exit(0) ... or do > > i need to read the code ? :) > > -mike Thanks for testing Alex, I am applying the patch. I am also reusing write_pidfile() from libbb here: if (opt & OPT_MAKEPID) { /* user wants _us_ to make the pidfile */ write_pidfile(pidfile); } In the process I (hopefully) fixed that nasty "ifupdown + udhcpc_without_pidpile_creation" fsckup... > You do need to read the code :-) > It's the parent who runs exit(), not the child, so it should be exit() and not _exit(). Mike is implying that _exit() is mucking around much less that exit() and for paranoid reasons we are better off using it. So I changed exit to _exit in that spot. We don't even need to fflush() before that, we did no output yet. > The child merely execv()s. So on NOMMU execv() basically creates another process in another memory region, and terminates current one, unless there is a parent sitting in vfork and waiting (in which case parent is woken up instead of exit)? -- vda From strange at nsk.no-ip.org Thu Aug 2 03:13:18 2007 From: strange at nsk.no-ip.org (Luciano Rocha) Date: Thu, 2 Aug 2007 11:13:18 +0100 Subject: I/O difficulties In-Reply-To: <867947.64675.qm@web53106.mail.re2.yahoo.com> References: <867947.64675.qm@web53106.mail.re2.yahoo.com> Message-ID: <20070802101318.GB28023@bit.office.eurotux.com> On Wed, Aug 01, 2007 at 02:59:25PM -0700, vahid rashtchi wrote: > I am using KB9202b evaluation board for developing a real time control system project. I am using c++ for programming and use buildroot compiler.I have difficulties in input /output operation and configuring interupt routin under busybox. > I can't perform I/O operation and see "permission denied" error. Does anyone have sample source code for these propose ? For the low-level I/O instructions (inb, inw, outb, outw, ...), you need to explicitly enable them with ioperm or iopl. See their manual pages. However, you can't change the interrupt routing table. You need to develop a kernel driver instead. See the book Linux Device Drivers: http://lwn.net/Kernel/LDD3/ (also http://www.kroah.com/log/linux/ddk.html) -- lfr 0/0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://busybox.net/lists/busybox/attachments/20070802/39b54895/attachment.pgp From landau_alex at yahoo.com Thu Aug 2 03:32:10 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Thu, 2 Aug 2007 03:32:10 -0700 (PDT) Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <1158166a0708020303k3c00b435qd72a8c3e00d0b9a0@mail.gmail.com> Message-ID: <810692.43452.qm@web62509.mail.re1.yahoo.com> --- Denis Vlasenko wrote: > On 8/2/07, Alex Landau wrote: > > --- Mike Frysinger wrote: > > > > > On Thursday 02 August 2007, Alex Landau wrote: > > > > + if (pid != 0) /* parent */ > > > > + exit(0); /* the child may have changed the stack, > > > > so no return possible, only function calls */ /* child */ > > > > > > i havent read the code, but gut feeling says that should be _exit(0) ... or do > > > i need to read the code ? :) > > > -mike > > Thanks for testing Alex, I am applying the patch. > I am also reusing write_pidfile() from libbb here: > > if (opt & OPT_MAKEPID) { > /* user wants _us_ to make the pidfile */ > write_pidfile(pidfile); > } > > In the process I (hopefully) fixed that nasty > "ifupdown + udhcpc_without_pidpile_creation" fsckup... > Tested, working. > > You do need to read the code :-) > > It's the parent who runs exit(), not the child, so it should be exit() and not > _exit(). > > Mike is implying that _exit() is mucking around much less that exit() > and for paranoid > reasons we are better off using it. So I changed exit to _exit in that spot. > We don't even need to fflush() before that, we did no output yet. I'm still not sure _exit is better in this case, but I'm not 100% sure it's wrong too... Anyway it's currently working. > > > The child merely execv()s. > > So on NOMMU execv() basically creates another process in another > memory region, and > terminates current one, unless there is a parent sitting in vfork and waiting > (in which case parent is woken up instead of exit)? No, execve works exactly it does on an MMU system. It loads a new executable into the current process. The difference is with vfork: on vfork, the parent is suspended, and the child shares it's whole address space with the parent (the stack is shared too - that's why this is so tricky!). The parent is resumed when the child either execve()s or _exit()s. > -- > vda > Alex ____________________________________________________________________________________ Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting From vda.linux at googlemail.com Thu Aug 2 03:36:46 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 2 Aug 2007 11:36:46 +0100 Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <810692.43452.qm@web62509.mail.re1.yahoo.com> References: <1158166a0708020303k3c00b435qd72a8c3e00d0b9a0@mail.gmail.com> <810692.43452.qm@web62509.mail.re1.yahoo.com> Message-ID: <1158166a0708020336r261e714hc3d3d443c8fdb30@mail.gmail.com> > > > The child merely execv()s. > > > > So on NOMMU execv() basically creates another process in another > > memory region, and > > terminates current one, unless there is a parent sitting in vfork and waiting > > (in which case parent is woken up instead of exit)? > > No, execve works exactly it does on an MMU system. It loads a new executable into the > current process. ...trashing all memory area occupied by the process? how parent is able to run then? > The difference is with vfork: on vfork, the parent is suspended, and the > child shares it's whole address space with the parent (the stack is shared too - that's > why this is so tricky!). The parent is resumed when the child either execve()s or > _exit()s. I don't understand how parent is able to run if execve just nuked parent's text segment with unrelated code of execed program. -- vda From landau_alex at yahoo.com Thu Aug 2 04:02:18 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Thu, 2 Aug 2007 04:02:18 -0700 (PDT) Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <1158166a0708020336r261e714hc3d3d443c8fdb30@mail.gmail.com> Message-ID: <867356.54135.qm@web62509.mail.re1.yahoo.com> --- Denis Vlasenko wrote: > > > > The child merely execv()s. > > > > > > So on NOMMU execv() basically creates another process in another > > > memory region, and > > > terminates current one, unless there is a parent sitting in vfork and waiting > > > (in which case parent is woken up instead of exit)? > > > > No, execve works exactly it does on an MMU system. It loads a new executable into the > > current process. > > ...trashing all memory area occupied by the process? how parent is > able to run then? And what about the normal fork and execve? With fork, the text vmas are shared too, and, I guess, on execve they are unshared. Not sure, but I guess the same happens here. Well, not the same, since there is a difference between a shared vma and a shared address_space, but it's the same idea. Anyway, that's my understanding. Alx > > > The difference is with vfork: on vfork, the parent is suspended, and the > > child shares it's whole address space with the parent (the stack is shared too - > that's > > why this is so tricky!). The parent is resumed when the child either execve()s or > > _exit()s. > > I don't understand how parent is able to run if execve just nuked > parent's text segment > with unrelated code of execed program. > -- > vda > ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ From landau_alex at yahoo.com Thu Aug 2 04:37:21 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Thu, 2 Aug 2007 04:37:21 -0700 (PDT) Subject: [PATCH] Fix udhcpc on no-MMU Message-ID: <798831.68564.qm@web62515.mail.re1.yahoo.com> Hi, Now it's udhcpc's turn. Actually a tiny patch that only changes the #ifdef which decides whether we have an MMU or not. Alex Index: networking/udhcp/dhcpc.c =================================================================== --- networking/udhcp/dhcpc.c (revision 19396) +++ networking/udhcp/dhcpc.c (working copy) @@ -109,7 +109,7 @@ static void client_background(void) { -#ifdef __uClinux__ +#if !BB_MMU bb_error_msg("cannot background in uclinux (yet)"); /* ... mainly because udhcpc calls client_background() * in _the _middle _of _udhcpc _run_, not at the start! ____________________________________________________________________________________ Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545433 From landau_alex at yahoo.com Thu Aug 2 05:08:09 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Thu, 2 Aug 2007 05:08:09 -0700 (PDT) Subject: msh and functions Message-ID: <320731.69074.qm@web62514.mail.re1.yahoo.com> Hi, The Blackfin uClinux distribution at blackfin.uclinux.org includes a patch to busybox's msh that adds support for functions. It's a bit outdated (the last time I checked), but I integrated it into busybox 1.4.1 and it works (for me) fine. msh hasn't changed considerably since then, so I think with small effort the patch could be integrated into trunk. I'm willing to volunteer to do that, but I'm having some concerns mainly do to the fact that I'm not the author of the original patch. The patch does not contain copyright information, but a readme is included with it saying: --START-- README for hacked msh Mickael.Kang (blackfin.kang at gmail.com) Dec. 13th 2005 This patch is for enhancement of msh. After apply this patch, msh can support function recursive call. So it is more like bash than before. Many applications under uClinux maybe need this patch to run some bash script under msh, such as oprofile. --END-- What can you say about that? Can someone from blackfin.uclinux.org (Mike?) check the issue and integrate the patch / approve the integration by someone else (e.g. me) / reject it? Thanks, Alex ____________________________________________________________________________________ Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting From landau_alex at yahoo.com Thu Aug 2 06:54:38 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Thu, 2 Aug 2007 06:54:38 -0700 (PDT) Subject: [PATCH] Add Blackfin to scripts/checkstack.pl Message-ID: <342715.31112.qm@web62502.mail.re1.yahoo.com> Hi, The patch below adds support for Blackfin to scripts/checkstack.pl. Please apply, if it seems appropriate. Alex Index: scripts/checkstack.pl =================================================================== --- scripts/checkstack.pl (revision 19396) +++ scripts/checkstack.pl (working copy) @@ -39,6 +39,9 @@ if ($arch eq 'arm') { #c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64 $re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o; + } elsif ($arch eq 'blackfin') { + # 52: 00 e8 03 00 LINK 0xc; + $re = qr/.*LINK (0x$x{1,5});$/o; } elsif ($arch =~ /^i[3456]86$/) { #c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp $re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%esp$/o; ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC From vda.linux at googlemail.com Thu Aug 2 10:52:46 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 2 Aug 2007 18:52:46 +0100 Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <867356.54135.qm@web62509.mail.re1.yahoo.com> References: <1158166a0708020336r261e714hc3d3d443c8fdb30@mail.gmail.com> <867356.54135.qm@web62509.mail.re1.yahoo.com> Message-ID: <1158166a0708021052o1a6123f7j5d1dbdb3c7f7a56f@mail.gmail.com> On 8/2/07, Alex Landau wrote: > > > > > The child merely execv()s. > > > > > > > > So on NOMMU execv() basically creates another process in another > > > > memory region, and > > > > terminates current one, unless there is a parent sitting in vfork and waiting > > > > (in which case parent is woken up instead of exit)? > > > > > > No, execve works exactly it does on an MMU system. It loads a new executable into the > > > current process. > > > > ...trashing all memory area occupied by the process? how parent is > > able to run then? > > And what about the normal fork and execve? That's MMU, and there it's all crystal clear. I was specifically thinking how our trick is working on _NOMMU_. Mostly for self-education. So, after execve on NOMMU old process is not destroyed, but "returned" to parent-after-vfork, and while parent does something, new process is already has memory allocated for it? OIW: at execve, does kernel do something like this? if (vfork_was_done) { create_and_start_new_process(); wake_up_parent_in_vfork(); } else { destroy_current_process(); create_and_start_new_process(); } -- vda From Gary.Leong at nasdaq.com Thu Aug 2 13:26:02 2007 From: Gary.Leong at nasdaq.com (Leong, Gary) Date: Thu, 2 Aug 2007 16:26:02 -0400 Subject: pivot_root, switch_root, initramfs and kexec Message-ID: I have an unsual situation. The first OS, a busybox OS, boots up through PXE. This first OS has "kexec" which is used to boot up a second OS. The second OS (also a busybox OS) boots up find as long as the system is diskless. However, when I try to do a switch_root onto the disk (which contains the second OS binaries), it craps out saying, "switch_root: not rootfs." But....when I replaced the switch_root with pivot_root style, it works fine. So I figure switch_root is checking to see process kicking it off is PID 1, and craps out if it isn't. And pivot_root doesn't check as thoroughly, or doesn't care if the process kicking it off is PID 1? How do I find out f the process kicking off is PID 1? To make it more interesting. I'm using initramfs, not initrd style, but using pivot_root that is suppose to be used only for initrd style. So another questions, is there really any harm using pivot_root with initramfs? It works. Or is pivot_root now able to be used with initramfs. Thanks in advance! Gary -------------- next part -------------- An HTML attachment was scrubbed... URL: http://busybox.net/lists/busybox/attachments/20070802/2ffd7a50/attachment.htm From vda.linux at googlemail.com Thu Aug 2 15:48:19 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 2 Aug 2007 23:48:19 +0100 Subject: [PATCH] Fix udhcpc on no-MMU In-Reply-To: <798831.68564.qm@web62515.mail.re1.yahoo.com> References: <798831.68564.qm@web62515.mail.re1.yahoo.com> Message-ID: <200708022348.19496.vda.linux@googlemail.com> On Thursday 02 August 2007 12:37, Alex Landau wrote: > Hi, > Now it's udhcpc's turn. Actually a tiny patch that only changes the #ifdef which decides > whether we have an MMU or not. > Alex > > Index: networking/udhcp/dhcpc.c > =================================================================== > --- networking/udhcp/dhcpc.c (revision 19396) > +++ networking/udhcp/dhcpc.c (working copy) > @@ -109,7 +109,7 @@ > > static void client_background(void) > { > -#ifdef __uClinux__ > +#if !BB_MMU > bb_error_msg("cannot background in uclinux (yet)"); > /* ... mainly because udhcpc calls client_background() > * in _the _middle _of _udhcpc _run_, not at the start! Applied, thanks. udhcp still needs more love. For one, the plan is to make udhcpc NOMMU-friendly someday. -- vda From ynakam at hitachisoft.jp Thu Aug 2 17:15:35 2007 From: ynakam at hitachisoft.jp (Yuichi Nakamura) Date: Fri, 03 Aug 2007 09:15:35 +0900 Subject: [patch] setfiles update Message-ID: <20070803091304.54C4.YNAKAM@hitachisoft.jp> Hi. This is a patch for setfiles applet. Following is change. * Bug fix: -f option did not work. * Using bb_simplify_path to remove extra slash for smaller code. Regards, -- Yuichi Nakamura Hitachi Software Engineering Co., Ltd. Japan SELinux Users Group(JSELUG): http://www.selinux.gr.jp/ SELinux Policy Editor: http://seedit.sourceforge.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: setfiles_update.patch Type: application/octet-stream Size: 1511 bytes Desc: not available Url : http://busybox.net/lists/busybox/attachments/20070803/ab1b900d/attachment.obj From vda.linux at googlemail.com Fri Aug 3 01:31:33 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Fri, 3 Aug 2007 09:31:33 +0100 Subject: NFS Support In-Reply-To: <7D23D3548EC1874CBA41E02F76963A614B36EB8B30@MTEX01.motiontrue.entp> References: <7D23D3548EC1874CBA41E02F76963A614B36EB8B30@MTEX01.motiontrue.entp> Message-ID: <200708030931.33706.vda.linux@googlemail.com> On Thursday 02 August 2007 09:25, Devinim ??LEN wrote: > Hi; > > I am using BusyBox version 1.6.1 and have a NFS mounting problem. When I try to mount NFS external point getting this error; > > mount -t nfs 192.168.10.64:/ /mnt > mount: mounting 192.168.10.64:/ on /mnt failed > > can anybody help ? * Please find the following line in mount.c: bb_error_msg("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir); and replace "_error_" with "_perror_". What does it print now? * Do "strace -o mnt.log mount -t nfs 192.168.10.64:/ /mnt" and post log * Do "tcpdump -nl -iethN -s0 -vvv host 192.168.10.64 and host " and post log here (bzip2 it if it's big) -- vda From ynakam at hitachisoft.jp Thu Aug 2 16:58:52 2007 From: ynakam at hitachisoft.jp (Yuichi Nakamura) Date: Fri, 03 Aug 2007 08:58:52 +0900 Subject: [patch]setfiles/restorecon applet In-Reply-To: <200707251807.58814.farmatito@tiscali.it> References: <20070724085858.41D8.YNAKAM@hitachisoft.jp> <200707251807.58814.farmatito@tiscali.it> Message-ID: <20070803084348.54BD.YNAKAM@hitachisoft.jp> Hi. Sorry for late reply. On Wed, 25 Jul 2007 18:07:58 +0200 Tito wrote: > On Tuesday 24 July 2007 02:08:24 Yuichi Nakamura wrote: > > Hi. > > > > snip > > > > > About sanitize_path, it is pending. > > Removing extra slashes is done only there in setfiles.c . > > Is removing extra slashes done in other applets? > > Yes in devfsd, removing extra slashes at the end of filename: > > in one earlier revision there was: > > /* strip last / from mount point, so we don't need to check for it later */ > while (argv[1][1] != '\0' && argv[1][strlen(argv[1]) - 1] == '/') > argv[1][strlen(argv[1]) - 1] = '\0'; > > later it changed to > > mount_point = bb_simplify_path(argv[1]); > > so far nobody complained..... I looked at setfiles.c again, and I found I can use bb_simplify_path, then code gets smaller. I will use bb_simplify_path. I will send patch soon. > > If so, should it be in libbb? > > Could be useful...... > just my 0,02 ? > > Ciao, > Tito > > I've found bb_simplify_path, but it is expanding "." . > > > > > > > > > > [snipping the rest of you patch for now] > > > > HTH, > > > -- > > > vda > > > > Attached is update. > Regards, -- Yuichi Nakamura Hitachi Software Engineering Co., Ltd. Japan SELinux Users Group(JSELUG): http://www.selinux.gr.jp/ SELinux Policy Editor: http://seedit.sourceforge.net/ From landau_alex at yahoo.com Fri Aug 3 02:14:45 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Fri, 3 Aug 2007 02:14:45 -0700 (PDT) Subject: [PATCH] Fix start-stop-daemon on no-MMU In-Reply-To: <1158166a0708021052o1a6123f7j5d1dbdb3c7f7a56f@mail.gmail.com> Message-ID: <879819.8242.qm@web62513.mail.re1.yahoo.com> --- Denis Vlasenko wrote: > I was specifically thinking how our trick is working on _NOMMU_. > Mostly for self-education. So, after execve on NOMMU old process > is not destroyed, but "returned" to parent-after-vfork, and > while parent does something, new process is already has memory > allocated for it? > > OIW: at execve, does kernel do something like this? > > if (vfork_was_done) { > create_and_start_new_process(); > wake_up_parent_in_vfork(); > } else { > destroy_current_process(); > create_and_start_new_process(); > } > > > -- > vda > No, vfork creates a new process (just like fork). I mean it creates a new struct task_struct, copies the kernel stack, and so on. So the child is an entirely new process with its own PID. What it does not copy is the mm_struct, but instead the child's one points to the parent's one. So now the parent and child are different processes sharing the same address space (due to CLONE_VM). vfork on Blackfin calls do_fork() with flags CLONE_VFORK | CLONE_VM | SIGCHLD, see kernel/fork.c for do_fork(). Inside do_fork(), if CLONE_VFORK is set, the parent waits on a completion variable until the child signals it, which happens on execve() and on exit(). On execve(), the child detaches from the parent mm_struct (flush_old_exec() which calls exec_mmap(), and itself called from the binary handler, e.g. load_flat_file() in fs/binfmt_flat.c for FLAT), and sets the child's mm to point to a newly allocated mm_struct (do_execve() does the allocation). mm_release() called from exec_mmap() (on execve) and from exit_mm() (called itself from do_exit()) checks whether the parent wait for a vfork completion, and if yes, signals it. I hope that helps. Regards, Alex ____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ From kalyanatejaswi at yahoo.co.in Fri Aug 3 09:44:33 2007 From: kalyanatejaswi at yahoo.co.in (kalyanatejaswi balabhadrapatruni) Date: Fri, 3 Aug 2007 17:44:33 +0100 (BST) Subject: bug in coreutils/printenv.c Message-ID: <6823.69286.qm@web8605.mail.in.yahoo.com> Hi all, "printenv" command prints argv[1] and exits, doesnt run through rest of the elements of argv[]. --------------- Example: #busybox printenv SHELL PWD /bin/sh # Doesnt print PWD ---------------- No great deal, small patch attached. regards kalyan Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: printenv-patch.txt Url: http://busybox.net/lists/busybox/attachments/20070803/690f37b4/attachment.txt From pclouds at gmail.com Fri Aug 3 14:58:12 2007 From: pclouds at gmail.com (Nguyen Thai Ngoc Duy) Date: Fri, 3 Aug 2007 17:58:12 -0400 Subject: [PATCH] patch: extract_filename should strip all dirs if patch_level is -1 Message-ID: It is also documented in the comment above the function but not implemented -- Duy From pclouds at gmail.com Fri Aug 3 17:45:32 2007 From: pclouds at gmail.com (Nguyen Thai Ngoc Duy) Date: Fri, 3 Aug 2007 20:45:32 -0400 Subject: [PATCH] sed: save the last regex for use later Message-ID: I'm not really get into sed source code, so I might be wrong. Please recheck it. With this patch, the following command should return 'abc' (GNU sed does but busybox did not): echo 'URL: abc'|busybox sed -ne '/^URL: */{ s///p; q }' -- Duy -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-sed-save-the-last-regex-for-use-later-with-s.patch Type: text/x-patch Size: 1116 bytes Desc: not available Url : http://busybox.net/lists/busybox/attachments/20070803/0feb4696/attachment.bin From cristian.ionescu-idbohrn at axis.com Sat Aug 4 04:07:23 2007 From: cristian.ionescu-idbohrn at axis.com (Cristian Ionescu-Idbohrn) Date: Sat, 4 Aug 2007 13:07:23 +0200 (CEST) Subject: just a few more compilation warnings Message-ID: <0708041302530.10759@somehost> Please find attached a sorted list of "declared with attribute warn_unused_result" warnings. Cheers, -- Cristian -------------- next part -------------- init/init.c:923: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result procps/fuser.c:278: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result archival/rpm.c:366: warning: ignoring return value of 'chown', declared with attribute warn_unused_result loginutils/getty.c:329: warning: ignoring return value of 'chown', declared with attribute warn_unused_result miscutils/crontab.c:169: warning: ignoring return value of 'chown', declared with attribute warn_unused_result util-linux/mdev.c:185: warning: ignoring return value of 'chown', declared with attribute warn_unused_result loginutils/sulogin.c:63: warning: ignoring return value of 'dup', declared with attribute warn_unused_result loginutils/sulogin.c:65: warning: ignoring return value of 'dup', declared with attribute warn_unused_result sysklogd/syslogd.c:538: warning: ignoring return value of 'fchdir', declared with attribute warn_unused_result libbb/update_passwd.c:56: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result loginutils/login.c:346: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result coreutils/comm.c:101: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result coreutils/comm.c:103: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result coreutils/comm.c:55: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result coreutils/comm.c:95: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result editors/ed.c:244: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result networking/arp.c:381: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result networking/interface.c:567: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result networking/interface.c:568: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result networking/libiproute/iptunnel.c:447: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result networking/libiproute/iptunnel.c:448: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result networking/wget.c:447: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result procps/top.c:265: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result util-linux/fbset.c:183: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result util-linux/fbset.c:195: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result modutils/lsmod.c:32: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result procps/top.c:267: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result procps/top.c:283: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result procps/top.c:292: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result procps/top.c:293: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result util-linux/mkfs_minix.c:528: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result sysklogd/syslogd.c:378: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result coreutils/fold.c:117: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result coreutils/fold.c:135: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result coreutils/fold.c:144: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result coreutils/fold.c:94: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result coreutils/tee.c:68: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result debianutils/pipe_progress.c:30: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result runit/svlogd.c:899: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result runit/svlogd.c:927: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result coreutils/test.c:574: warning: ignoring return value of 'getgroups', declared with attribute warn_unused_result archival/libunarchive/data_extract_all.c:115: warning: ignoring return value of 'lchown', declared with attribute warn_unused_result miscutils/less.c:745: warning: ignoring return value of 'read', declared with attribute warn_unused_result modutils/insmod.c:3673: warning: ignoring return value of 'read', declared with attribute warn_unused_result networking/inetd.c:1597: warning: ignoring return value of 'read', declared with attribute warn_unused_result debianutils/start_stop_daemon.c:45: warning: ignoring return value of 'readlink', declared with attribute warn_unused_result util-linux/umount.c:96: warning: ignoring return value of 'realpath', declared with attribute warn_unused_result console-tools/resize.c:54: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result util-linux/mdev.c:183: warning: ignoring return value of 'symlink', declared with attribute warn_unused_result loginutils/adduser.c:76: warning: ignoring return value of 'system', declared with attribute warn_unused_result networking/udhcp/files.c:410: warning: ignoring return value of 'system', declared with attribute warn_unused_result procps/watch.c:76: warning: ignoring return value of 'system', declared with attribute warn_unused_result console-tools/dumpkmap.c:37: warning: ignoring return value of 'write', declared with attribute warn_unused_result console-tools/dumpkmap.c:46: warning: ignoring return value of 'write', declared with attribute warn_unused_result console-tools/dumpkmap.c:59: warning: ignoring return value of 'write', declared with attribute warn_unused_result editors/ed.c:979: warning: ignoring return value of 'write', declared with attribute warn_unused_result ipsvd/tcpudp.c:314: warning: ignoring return value of 'write', declared with attribute warn_unused_result loginutils/getty.c:549: warning: ignoring return value of 'write', declared with attribute warn_unused_result loginutils/getty.c:557: warning: ignoring return value of 'write', declared with attribute warn_unused_result loginutils/getty.c:569: warning: ignoring return value of 'write', declared with attribute warn_unused_result loginutils/getty.c:795: warning: ignoring return value of 'write', declared with attribute warn_unused_result loginutils/getty.c:848: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/crontab.c:279: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/crontab.c:281: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/rx.c:105: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/rx.c:211: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/rx.c:232: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/rx.c:239: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/rx.c:81: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/watchdog.c:19: warning: ignoring return value of 'write', declared with attribute warn_unused_result miscutils/watchdog.c:53: warning: ignoring return value of 'write', declared with attribute warn_unused_result modutils/insmod.c:3677: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/inetd.c:1719: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/inetd.c:1758: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/telnet.c:117: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/telnet.c:148: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/telnet.c:195: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/telnet.c:269: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/telnet.c:430: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/telnet.c:656: warning: ignoring return value of 'write', declared with attribute warn_unused_result networking/telnet.c:98: warning: ignoring return value of 'write', declared with attribute warn_unused_result procps/sysctl.c:53: warning: ignoring return value of 'write', declared with attribute warn_unused_result runit/runsv.c:104: warning: ignoring return value of 'write', declared with attribute warn_unused_result runit/runsv.c:149: warning: ignoring return value of 'write', declared with attribute warn_unused_result runit/runsv.c:189: warning: ignoring return value of 'write', declared with attribute warn_unused_result runit/runsv.c:98: warning: ignoring return value of 'write', declared with attribute warn_unused_result runit/runsvdir.c:300: warning: ignoring return value of 'write', declared with attribute warn_unused_result util-linux/dmesg.c:45: warning: ignoring return value of 'write', declared with attribute warn_unused_result util-linux/mdev.c:278: warning: ignoring return value of 'write', declared with attribute warn_unused_result util-linux/mdev.c:280: warning: ignoring return value of 'write', declared with attribute warn_unused_result From cristian.ionescu-idbohrn at axis.com Sat Aug 4 04:43:45 2007 From: cristian.ionescu-idbohrn at axis.com (Cristian Ionescu-Idbohrn) Date: Sat, 4 Aug 2007 13:43:45 +0200 (CEST) Subject: won't build with debian uclibc-toolchain 0.9.27-1... Message-ID: <0708041341350.10759@somehost> ...which is the latest distributed. CC miscutils/readahead.o miscutils/readahead.c: In function `readahead_main': miscutils/readahead.c:27: warning: implicit declaration of function `readahead' CC miscutils/taskset.o miscutils/taskset.c:17: error: syntax error before '*' token miscutils/taskset.c:18: warning: function declaration isn't a prototype miscutils/taskset.c: In function `__from_cpuset': miscutils/taskset.c:22: error: `CPU_SETSIZE' undeclared (first use in this function) miscutils/taskset.c:22: error: (Each undeclared identifier is reported only once miscutils/taskset.c:22: error: for each function it appears in.) miscutils/taskset.c:26: warning: implicit declaration of function `CPU_ISSET' miscutils/taskset.c:26: error: `mask' undeclared (first use in this function) miscutils/taskset.c: In function `taskset_main': miscutils/taskset.c:47: error: `cpu_set_t' undeclared (first use in this function) miscutils/taskset.c:47: error: syntax error before "mask" miscutils/taskset.c:68: warning: implicit declaration of function `CPU_ZERO' miscutils/taskset.c:68: error: `new_mask' undeclared (first use in this function) miscutils/taskset.c:69: error: `CPU_SETSIZE' undeclared (first use in this function) miscutils/taskset.c:71: warning: implicit declaration of function `CPU_SET' miscutils/taskset.c:78: warning: implicit declaration of function `sched_getaffinity' miscutils/taskset.c:78: error: `mask' undeclared (first use in this function) miscutils/taskset.c:86: warning: implicit declaration of function `sched_setaffinity' make[1]: *** [miscutils/taskset.o] Error 1 make: *** [miscutils] Error 2 Cheers, -- Cristian From Alexander at Kriegisch.name Sat Aug 4 06:22:08 2007 From: Alexander at Kriegisch.name (Alexander Kriegisch) Date: Sat, 04 Aug 2007 15:22:08 +0200 Subject: ash - exit code for a piped process Message-ID: <46B47D80.7040909@Kriegisch.name> I would like to determine the exit code of 'foo' in foo | bar I bash there is the PIPESTATUS array, but in ash (which I must use) there is no such thing as PIPESTATUS or arrays. Is there any canonical way or at least a workaround to achieve both piping the foo's output into bar unconditionally *and* determining foo's exit code? Thanks -- Alexander Kriegisch From vapier at gentoo.org Sat Aug 4 06:48:43 2007 From: vapier at gentoo.org (Mike Frysinger) Date: Sat, 4 Aug 2007 09:48:43 -0400 Subject: won't build with debian uclibc-toolchain 0.9.27-1... In-Reply-To: <0708041341350.10759@somehost> References: <0708041341350.10759@somehost> Message-ID: <200708040948.44414.vapier@gentoo.org> On Saturday 04 August 2007, Cristian Ionescu-Idbohrn wrote: > ...which is the latest distributed. no it isnt, Debian is out of date > CC miscutils/readahead.o > CC miscutils/taskset.o if the applets fail, dont enable them -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://busybox.net/lists/busybox/attachments/20070804/c8a52132/attachment.pgp From loic.grenie at gmail.com Sat Aug 4 06:45:56 2007 From: loic.grenie at gmail.com (=?ISO-8859-1?Q?Lo=EFc_Greni=E9?=) Date: Sat, 4 Aug 2007 13:45:56 +0000 Subject: ash - exit code for a piped process In-Reply-To: <46B47D80.7040909@Kriegisch.name> References: <46B47D80.7040909@Kriegisch.name> Message-ID: <9b06e8d20708040645j10272777p6e5ee7bf29e9c36c@mail.gmail.com> 2007/8/4, Alexander Kriegisch : > I would like to determine the exit code of 'foo' in > foo | bar > > I bash there is the PIPESTATUS array, but in ash (which I must use) > there is no such thing as PIPESTATUS or arrays. Is there any canonical > way or at least a workaround to achieve both piping the foo's output > into bar unconditionally *and* determining foo's exit code? x=`((( foo 3>&- 4>&- ); echo $? >&3)| bar >&4 3>&- 4>&-) 3>&1` 4>&1 should do the trick. The exit code of foo is in x, the output of bar goes to the output of the command. Hope this helps. Lo?c From Alexander at Kriegisch.name Sat Aug 4 07:16:44 2007 From: Alexander at Kriegisch.name (Alexander Kriegisch) Date: Sat, 04 Aug 2007 16:16:44 +0200 Subject: ash - exit code for a piped process In-Reply-To: <9b06e8d20708040645j10272777p6e5ee7bf29e9c36c@mail.gmail.com> References: <46B47D80.7040909@Kriegisch.name> <9b06e8d20708040645j10272777p6e5ee7bf29e9c36c@mail.gmail.com> Message-ID: <46B48A4C.8060001@Kriegisch.name> > x=`((( foo 3>&- 4>&- ); echo $? >&3)| bar >&4 3>&- 4>&-) 3>&1` 4>&1 Thanks, Lo?c. I will consider your solution if I ever have a case like this again, but my current workaround is rather simple to read and uses a text buffer for the first command's output. I can do this because I know that foo's output has a limited size which can be easily handled in memory. So I choose this way for the sake of readability: output=$(foo) result=$? echo "$output" | bar I know the solution is somewhat limited, but a feasibly workaround in my special case. Yours is more refined and really uses pipes. -- Alexander Kriegisch From farmatito at tiscali.it Sat Aug 4 07:24:18 2007 From: farmatito at tiscali.it (Tito) Date: Sat, 4 Aug 2007 16:24:18 +0200 Subject: ash - exit code for a piped process In-Reply-To: <9b06e8d20708040645j10272777p6e5ee7bf29e9c36c@mail.gmail.com> References: <46B47D80.7040909@Kriegisch.name> <9b06e8d20708040645j10272777p6e5ee7bf29e9c36c@mail.gmail.com> Message-ID: <200708041624.18065.farmatito@tiscali.it> On Saturday 04 August 2007 15:45:56 Lo?c Greni? wrote: > 2007/8/4, Alexander Kriegisch : > > I would like to determine the exit code of 'foo' in > > foo | bar > > > > I bash there is the PIPESTATUS array, but in ash (which I must use) > > there is no such thing as PIPESTATUS or arrays. Is there any canonical > > way or at least a workaround to achieve both piping the foo's output > > into bar unconditionally *and* determining foo's exit code? > > x=`((( foo 3>&- 4>&- ); echo $? >&3)| bar >&4 3>&- 4>&-) 3>&1` 4>&1 > > should do the trick. The exit code of foo is in x, the output of bar > goes to the output of the command. > > Hope this helps. > > Lo?c foo > out.file ret=$? cat out.file | bar # rm out.file Untested. Just an idea........... Ciao, Tito From cristian.ionescu-idbohrn at axis.com Sun Aug 5 00:48:41 2007 From: cristian.ionescu-idbohrn at axis.com (Cristian Ionescu-Idbohrn) Date: Sun, 5 Aug 2007 09:48:41 +0200 (CEST) Subject: won't build with debian uclibc-toolchain 0.9.27-1... In-Reply-To: <200708040948.44414.vapier@gentoo.org> References: <0708041341350.10759@somehost> <200708040948.44414.vapier@gentoo.org> Message-ID: <0708050905310.9234@somehost> On Sat, 4 Aug 2007, Mike Frysinger wrote: > On Saturday 04 August 2007, Cristian Ionescu-Idbohrn wrote: > > ...which is the latest distributed. > > no it isnt, yes, it is :) the latest debian distributed uclibc-toolchain. > Debian is out of date of course. > > CC miscutils/readahead.o > > CC miscutils/taskset.o > > if the applets fail, dont enable them right. my message was just meant to provide some information, nothing else. Cheers, -- Cristian From rep.dot.nop at gmail.com Sun Aug 5 04:33:14 2007 From: rep.dot.nop at gmail.com (Bernhard Fischer) Date: Sun, 5 Aug 2007 13:33:14 +0200 Subject: just a few more compilation warnings In-Reply-To: <0708041302530.10759@somehost> References: <0708041302530.10759@somehost> Message-ID: <20070805113314.GN11697@aon.at> On Sat, Aug 04, 2007 at 01:07:23PM +0200, Cristian Ionescu-Idbohrn wrote: >Please find attached a sorted list of "declared with attribute >warn_unused_result" warnings. See $ svn log -r18877 From rep.dot.nop at gmail.com Sun Aug 5 04:36:52 2007 From: rep.dot.nop at gmail.com (Bernhard Fischer) Date: Sun, 5 Aug 2007 13:36:52 +0200 Subject: won't build with debian uclibc-toolchain 0.9.27-1... In-Reply-To: <0708050905310.9234@somehost> References: <0708041341350.10759@somehost> <200708040948.44414.vapier@gentoo.org> <0708050905310.9234@somehost> Message-ID: <20070805113652.GO11697@aon.at> On Sun, Aug 05, 2007 at 09:48:41AM +0200, Cristian Ionescu-Idbohrn wrote: >On Sat, 4 Aug 2007, Mike Frysinger wrote: > >> On Saturday 04 August 2007, Cristian Ionescu-Idbohrn wrote: >> > ...which is the latest distributed. >> >> no it isnt, > >yes, it is :) the latest debian distributed uclibc-toolchain. No, it isn't. About any toolchain that may be downloadable from uClibc.org or busybox.net is outdated. Nowadays, you should either use emdebian, buildroot or gentoo or one of the dozend other distros that come with native uClibc support. >> if the applets fail, dont enable them > >right. my message was just meant to provide some information, nothing >else. Thanks, but as you can see from the archives (and even some help-texts of one of the abovementioned applets) this is a non-issue since you're using an outdated toolchain :) From ml at zastrow4u.de Sun Aug 5 10:40:12 2007 From: ml at zastrow4u.de (Alfred Zastrow) Date: Sun, 05 Aug 2007 19:40:12 +0200 Subject: applet-request: expand Message-ID: <46B60B7C.6080108@zastrow4u.de> Hello list, glibc-2.6.1 compiles fine by using most of the applets of busybox-1.6.1, but "expand" of coreutils is still missing: ----------snip---------------- sed -e 's,[{}],@&,g' \ -e 's,/\*\(@.*\)\*/,\1,g' \ -e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \ -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g'\ examples/stpcpy.c | expand > stpcpy.c.texi.new /bin/sh: line 4: expand: command not found make[2]: *** [stpcpy.c.texi] Error 127 make[2]: Leaving directory `/build/glibc-2.6.1/manual' make[1]: *** [manual/subdir_install] Error 2 make[1]: Leaving directory `/build/glibc-2.6.1' make: *** [install] Fehler 2 ----------snap---------------- Is there any chance to get this in? cu Alfred From jako at grand.com.tw Sun Aug 5 18:05:56 2007 From: jako at grand.com.tw (Grandtec Jako) Date: Mon, 6 Aug 2007 09:05:56 +0800 Subject: httpd question Message-ID: <002601c7d7c5$f1eb7e60$d3a8a8c0@GRANDTECJACKY> Hi, I use busybox v1.00 version at PC board. I use "ifconfig eth0 192.168.168.214 up" , and "httpd -p 80 -h /cgi-bin -c /etc/httpd.conf -r "Web Server Authentication" &" commands. Then I open webpage at http://192.168.168.214. Now, I have two questions. Q1. If I open webpage at first http://192.168.168.214, I will not open Web Page at second http://192.168.168.214. But it have displayed login-in (input id and password) pup-up. Q2. When I open webpage at first http://192.168.168.214, the index.html can't link to other Web Pages. About httpd.conf file: ------------------------------ A:* /:root:admin /cgi-bin:foo:bar /adm:admin:setup /adm:toor:PaSsWd .htm:text/html .html:text/html ------------------------------- Can you give me some suggestions ? Thanks. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://busybox.net/lists/busybox/attachments/20070806/0c609b59/attachment.htm From vda.linux at googlemail.com Sun Aug 5 19:26:16 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 03:26:16 +0100 Subject: [patch] setfiles update In-Reply-To: <20070803091304.54C4.YNAKAM@hitachisoft.jp> References: <20070803091304.54C4.YNAKAM@hitachisoft.jp> Message-ID: <200708060326.16357.vda.linux@googlemail.com> On Friday 03 August 2007 01:15, Yuichi Nakamura wrote: > This is a patch for setfiles applet. > Following is change. > * Bug fix: -f option did not work. > * Using bb_simplify_path to remove extra slash for smaller code. Applied, thanks -- vda From vda.linux at googlemail.com Sun Aug 5 19:46:09 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 03:46:09 +0100 Subject: bug in coreutils/printenv.c In-Reply-To: <6823.69286.qm@web8605.mail.in.yahoo.com> References: <6823.69286.qm@web8605.mail.in.yahoo.com> Message-ID: <200708060346.09171.vda.linux@googlemail.com> On Friday 03 August 2007 17:44, kalyanatejaswi balabhadrapatruni wrote: > Hi all, > "printenv" command prints argv[1] and exits, doesnt > run through rest of the elements of argv[]. > --------------- > Example: > #busybox printenv SHELL PWD > /bin/sh > # > Doesnt print PWD > ---------------- > > No great deal, small patch attached. I am replacing open-coded environ[] scan there with getenv: + while ((arg = *++argv) != NULL) { + env = getenv(arg); + if (env) + puts(env); + } Saves ~75 bytes too. Please test svn, should be fixed now. Thanks. -- vda From vda.linux at googlemail.com Sun Aug 5 19:47:32 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 03:47:32 +0100 Subject: [PATCH] patch: extract_filename should strip all dirs if patch_level is -1 In-Reply-To: References: Message-ID: <200708060347.32312.vda.linux@googlemail.com> On Friday 03 August 2007 22:58, Nguyen Thai Ngoc Duy wrote: > It is also documented in the comment above the function but not implemented No patch is attached to your mail... -- vda From vda.linux at googlemail.com Sun Aug 5 20:31:02 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 04:31:02 +0100 Subject: [PATCH] sed: save the last regex for use later In-Reply-To: References: Message-ID: <200708060431.02810.vda.linux@googlemail.com> On Saturday 04 August 2007 01:45, Nguyen Thai Ngoc Duy wrote: > I'm not really get into sed source code, so I might be wrong. Please recheck it. > With this patch, the following command should return 'abc' (GNU sed > does but busybox did not): > echo 'URL: abc'|busybox sed -ne '/^URL: */{ s///p; q }' Applied, thanks. Seems to not break any of testsuite entry. -- vda From vapier at gentoo.org Mon Aug 6 01:14:55 2007 From: vapier at gentoo.org (Mike Frysinger) Date: Mon, 6 Aug 2007 04:14:55 -0400 Subject: @mail.com users are now banned in bugs Message-ID: <200708060414.56144.vapier@gentoo.org> we've seen ~40 spam accounts registered this last week (a few every day) and each one was @mail.com so ive tweaked mantis to silently ignore registrations for @mail.com addresses. not a big deal since of the ~1200 registered people, 0 are using this craptastic webmail service. if it starts to be a problem with random addresses, we can look at requiring captchas, but i personally hate those goddamn things ... -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://busybox.net/lists/busybox/attachments/20070806/d9b8c7f7/attachment.pgp From per.hallsmark at t2data.se Mon Aug 6 01:21:50 2007 From: per.hallsmark at t2data.se (Per Hallsmark) Date: Mon, 06 Aug 2007 10:21:50 +0200 Subject: hush in arm nommu environment Message-ID: <46B6DA1E.1090502@t2data.se> Hi all, I've tried out the hush shell in busybox 1.6.1. Seems to work fairly well with the patch last in this mail. The only(?) thing that doesn't work however, is backspace... or to be more correct, it do backspace in the commandline but it isn't displayed correctly. If I have fancy editing enabling then the character is moved to the RIGHT instead of LEFT when I backspace. If I don't have fancy editing enabled, it prints out some garbage (same all time) like: ~ # lsUP!) UP!)UP!) UP!) (backspace pressed twice) The only string I can find that looks like UP!) is: [per at phlap3 busybox-1.6.1]$ grep -r UP\! * networking/ping.c: const char *dupmsg = " (DUP!)"; [per at phlap3 busybox-1.6.1]$ So it seems like a weird pointer issue... I use busybox 1.6.1, gcc 4.1.2 and kernel 2.6.19-uc1 on a arm7tdmi'ish mcu. Anyone encountered this behaviour? /Per --- busybox-1.6.1.orig/shell/hush.c 2007-06-30 17:06:37.000000000 +0200 +++ busybox-1.6.1/shell/hush.c 2007-08-02 15:41:22.000000000 +0200 @@ -658,7 +658,11 @@ pid_t pid; debug_printf_jobs("got tty sig %d in pid %d\n", sig, getpid()); +#if BB_MMU pid = fork(); +#else + pid = vfork(); +#endif if (pid < 0) /* can't fork. Pretend there was no ctrl-Z */ return; ctrl_z_flag = 1; From per.hallsmark at t2data.se Mon Aug 6 02:35:41 2007 From: per.hallsmark at t2data.se (Per Hallsmark) Date: Mon, 06 Aug 2007 11:35:41 +0200 Subject: hush in arm nommu environment In-Reply-To: <46B6DA1E.1090502@t2data.se> References: <46B6DA1E.1090502@t2data.se> Message-ID: <46B6EB6D.8000300@t2data.se> well... sometimes one can answer oneself... :) --- busybox-1.6.1.orig/libbb/lineedit.c 2007-06-30 17:06:40.000000000 +0200 +++ busybox-1.6.1/libbb/lineedit.c 2007-08-06 11:23:57.000000000 +0200 @@ -165,10 +165,12 @@ if (cmdedit_x >= num) { cmdedit_x -= num; +#if 0 if (num <= 4) { printf("\b\b\b\b" + (4-num)); return; } +#endif printf("\033[%uD", num); return; } With above patch backspace works ok. The \b\b... printf looks rather mystic... guess the author perhaps wanted something like this instead? switch (num) { case 4: printf("\b"); /* fall trough */ case 3: printf("\b"); /* fall trough */ case 2: printf("\b"); /* fall trough */ case 1: printf("\b"); return; default: } but I wonder what the benefits are... Per Hallsmark wrote: > Hi all, > > I've tried out the hush shell in busybox 1.6.1. > Seems to work fairly well with the patch last in > this mail. > > The only(?) thing that doesn't work however, is > backspace... or to be more correct, it do backspace > in the commandline but it isn't displayed correctly. > If I have fancy editing enabling then the character > is moved to the RIGHT instead of LEFT when I backspace. > If I don't have fancy editing enabled, it prints out > some garbage (same all time) like: > > ~ # lsUP!) UP!)UP!) UP!) > (backspace pressed twice) > > The only string I can find that looks like UP!) is: > > [per at phlap3 busybox-1.6.1]$ grep -r UP\! * > networking/ping.c: const char *dupmsg = " (DUP!)"; > [per at phlap3 busybox-1.6.1]$ > > So it seems like a weird pointer issue... > > I use busybox 1.6.1, gcc 4.1.2 and kernel 2.6.19-uc1 on > a arm7tdmi'ish mcu. > > Anyone encountered this behaviour? > > /Per > > --- busybox-1.6.1.orig/shell/hush.c 2007-06-30 17:06:37.000000000 +0200 > +++ busybox-1.6.1/shell/hush.c 2007-08-02 15:41:22.000000000 +0200 > @@ -658,7 +658,11 @@ > pid_t pid; > > debug_printf_jobs("got tty sig %d in pid %d\n", sig, getpid()); > +#if BB_MMU > pid = fork(); > +#else > + pid = vfork(); > +#endif > if (pid < 0) /* can't fork. Pretend there was no ctrl-Z */ > return; > ctrl_z_flag = 1; > > _______________________________________________ > busybox mailing list > busybox at busybox.net > http://busybox.net/cgi-bin/mailman/listinfo/busybox From per.hallsmark at t2data.se Mon Aug 6 02:35:52 2007 From: per.hallsmark at t2data.se (Per Hallsmark) Date: Mon, 06 Aug 2007 11:35:52 +0200 Subject: hush in arm nommu environment In-Reply-To: <46B6DA1E.1090502@t2data.se> References: <46B6DA1E.1090502@t2data.se> Message-ID: <46B6EB78.7040204@t2data.se> well... sometimes one can answer oneself... :) --- busybox-1.6.1.orig/libbb/lineedit.c 2007-06-30 17:06:40.000000000 +0200 +++ busybox-1.6.1/libbb/lineedit.c 2007-08-06 11:23:57.000000000 +0200 @@ -165,10 +165,12 @@ if (cmdedit_x >= num) { cmdedit_x -= num; +#if 0 if (num <= 4) { printf("\b\b\b\b" + (4-num)); return; } +#endif printf("\033[%uD", num); return; } With above patch backspace works ok. The \b\b... printf looks rather mystic... guess the author perhaps wanted something like this instead? switch (num) { case 4: printf("\b"); /* fall trough */ case 3: printf("\b"); /* fall trough */ case 2: printf("\b"); /* fall trough */ case 1: printf("\b"); return; default: } but I wonder what the benefits are... Per Hallsmark wrote: > Hi all, > > I've tried out the hush shell in busybox 1.6.1. > Seems to work fairly well with the patch last in > this mail. > > The only(?) thing that doesn't work however, is > backspace... or to be more correct, it do backspace > in the commandline but it isn't displayed correctly. > If I have fancy editing enabling then the character > is moved to the RIGHT instead of LEFT when I backspace. > If I don't have fancy editing enabled, it prints out > some garbage (same all time) like: > > ~ # lsUP!) UP!)UP!) UP!) > (backspace pressed twice) > > The only string I can find that looks like UP!) is: > > [per at phlap3 busybox-1.6.1]$ grep -r UP\! * > networking/ping.c: const char *dupmsg = " (DUP!)"; > [per at phlap3 busybox-1.6.1]$ > > So it seems like a weird pointer issue... > > I use busybox 1.6.1, gcc 4.1.2 and kernel 2.6.19-uc1 on > a arm7tdmi'ish mcu. > > Anyone encountered this behaviour? > > /Per > > --- busybox-1.6.1.orig/shell/hush.c 2007-06-30 17:06:37.000000000 +0200 > +++ busybox-1.6.1/shell/hush.c 2007-08-02 15:41:22.000000000 +0200 > @@ -658,7 +658,11 @@ > pid_t pid; > > debug_printf_jobs("got tty sig %d in pid %d\n", sig, getpid()); > +#if BB_MMU > pid = fork(); > +#else > + pid = vfork(); > +#endif > if (pid < 0) /* can't fork. Pretend there was no ctrl-Z */ > return; > ctrl_z_flag = 1; > > _______________________________________________ > busybox mailing list > busybox at busybox.net > http://busybox.net/cgi-bin/mailman/listinfo/busybox From landau_alex at yahoo.com Mon Aug 6 04:23:01 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Mon, 6 Aug 2007 04:23:01 -0700 (PDT) Subject: Bug in lastest commit of scripts/trylink (r19409) Message-ID: <586940.66267.qm@web62504.mail.re1.yahoo.com> Hi, At the very end, when doing the final link it's written: try && exit 1 which should be: try || exit 1 Currently busybox is not being built from busybox_unstripped. Alex ____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ From pclouds at gmail.com Mon Aug 6 04:33:58 2007 From: pclouds at gmail.com (Nguyen Thai Ngoc Duy) Date: Mon, 6 Aug 2007 07:33:58 -0400 Subject: [PATCH] patch: extract_filename should strip all dirs if patch_level is -1 In-Reply-To: <200708060347.32312.vda.linux@googlemail.com> References: <200708060347.32312.vda.linux@googlemail.com> Message-ID: Oops, sorry. Here coms the patch. On 8/5/07, Denis Vlasenko wrote: > On Friday 03 August 2007 22:58, Nguyen Thai Ngoc Duy wrote: > > It is also documented in the comment above the function but not implemented > > No patch is attached to your mail... > -- > vda > -- Duy -------------- next part -------------- A non-text attachment was scrubbed... Name: patch-strip.patch Type: text/x-patch Size: 589 bytes Desc: not available Url : http://busybox.net/lists/busybox/attachments/20070806/9c39a5a5/attachment.bin From landau_alex at yahoo.com Mon Aug 6 04:50:43 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Mon, 6 Aug 2007 04:50:43 -0700 (PDT) Subject: [PATCH] catv wrong behaviour when no arguments passed Message-ID: <514417.87596.qm@web62503.mail.re1.yahoo.com> Hi, When catv gets no files on the command line (argv[0] == NULL after getopt), after doing its work it increments argv to point to the next argument, but since argv is already NULL, catv tries to open files whose names are the environment strings (e.g. "HOME=/home/user", "PATH=..."). The fix/workaround below is to pre-decrement argv in this case, so that when it is incremented later it will be NULL and the loop will break. Alex Index: coreutils/catv.c =================================================================== --- coreutils/catv.c (revision 19409) +++ coreutils/catv.c (working copy) @@ -27,8 +27,10 @@ /* Read from stdin if there's nothing else to do. */ fd = 0; - if (!argv[0]) + if (!argv[0]) { + argv--; goto jump_in; + } do { fd = open_or_warn(*argv, O_RDONLY); if (fd < 0) { ____________________________________________________________________________________ Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545433 From vda.linux at googlemail.com Mon Aug 6 05:07:54 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 13:07:54 +0100 Subject: Bug in lastest commit of scripts/trylink (r19409) In-Reply-To: <586940.66267.qm@web62504.mail.re1.yahoo.com> References: <586940.66267.qm@web62504.mail.re1.yahoo.com> Message-ID: <200708061307.54607.vda.linux@googlemail.com> On Monday 06 August 2007 12:23, Alex Landau wrote: > At the very end, when doing the final link it's written: > try && exit 1 > which should be: > try || exit 1 > > Currently busybox is not being built from busybox_unstripped. Thanks, fixed. -- vda From vda.linux at googlemail.com Mon Aug 6 05:26:16 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 13:26:16 +0100 Subject: [PATCH] patch: extract_filename should strip all dirs if patch_level is -1 In-Reply-To: References: <200708060347.32312.vda.linux@googlemail.com> Message-ID: <200708061326.16666.vda.linux@googlemail.com> On Monday 06 August 2007 12:33, Nguyen Thai Ngoc Duy wrote: > Oops, sorry. Here coms the patch. > > On 8/5/07, Denis Vlasenko wrote: > > On Friday 03 August 2007 22:58, Nguyen Thai Ngoc Duy wrote: > > > It is also documented in the comment above the function but not implemented > > > > No patch is attached to your mail... > > -- > > vda Fixed in svn, thanks -- vda From vda.linux at googlemail.com Mon Aug 6 06:23:49 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 14:23:49 +0100 Subject: [PATCH] Add Blackfin to scripts/checkstack.pl In-Reply-To: <342715.31112.qm@web62502.mail.re1.yahoo.com> References: <342715.31112.qm@web62502.mail.re1.yahoo.com> Message-ID: <200708061423.49765.vda.linux@googlemail.com> On Thursday 02 August 2007 14:54, Alex Landau wrote: > Hi, > The patch below adds support for Blackfin to scripts/checkstack.pl. > Please apply, if it seems appropriate. > Alex Applied, thanks. -- vda From vda.linux at googlemail.com Mon Aug 6 06:25:03 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 14:25:03 +0100 Subject: [PATCH] catv wrong behaviour when no arguments passed In-Reply-To: <514417.87596.qm@web62503.mail.re1.yahoo.com> References: <514417.87596.qm@web62503.mail.re1.yahoo.com> Message-ID: <200708061425.03178.vda.linux@googlemail.com> On Monday 06 August 2007 12:50, Alex Landau wrote: > Hi, > > When catv gets no files on the command line (argv[0] == NULL after getopt), after doing > its work it increments argv to point to the next argument, but since argv is already > NULL, catv tries to open files whose names are the environment strings (e.g. > "HOME=/home/user", "PATH=..."). > The fix/workaround below is to pre-decrement argv in this case, so that when it is > incremented later it will be NULL and the loop will break. Applied, thanks -- vda From vda.linux at googlemail.com Mon Aug 6 06:26:40 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 14:26:40 +0100 Subject: [PATCH-suggestion] The pidfile problem of udhcpc In-Reply-To: <1183388051.4000.45.camel@Blue2net-mats.bellman.mea> References: <1183388051.4000.45.camel@Blue2net-mats.bellman.mea> Message-ID: <200708061426.40949.vda.linux@googlemail.com> On Monday 02 July 2007 15:54, Mats Erik Andersson wrote: > Hi again, > > I have analyzed and located the problem with udhcpc > for todays snapshot of Busybox when one uses > > # CONFIG_FEATURE_PIDFILE is not set It should be fixed now. If it's not, let me know. -- vda From vda.linux at googlemail.com Mon Aug 6 06:28:19 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 14:28:19 +0100 Subject: httpd question In-Reply-To: <002601c7d7c5$f1eb7e60$d3a8a8c0@GRANDTECJACKY> References: <002601c7d7c5$f1eb7e60$d3a8a8c0@GRANDTECJACKY> Message-ID: <200708061428.19752.vda.linux@googlemail.com> On Monday 06 August 2007 02:05, Grandtec Jako wrote: > Hi, > > I use busybox v1.00 version at PC board. > I use "ifconfig eth0 192.168.168.214 up" , and "httpd -p 80 -h /cgi-bin -c /etc/httpd.conf -r "Web Server Authentication" &" commands. > Then I open webpage at http://192.168.168.214. > Now, I have two questions. > > Q1. If I open webpage at first http://192.168.168.214, I will not open Web Page at second http://192.168.168.214. > But it have displayed login-in (input id and password) pup-up. > > Q2. When I open webpage at first http://192.168.168.214, the index.html can't link to other Web Pages. I failed to understand both questions. http://catb.org/~esr/faqs/smart-questions.html -- vda From vda.linux at googlemail.com Mon Aug 6 07:07:26 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 15:07:26 +0100 Subject: hush in arm nommu environment In-Reply-To: <46B6EB78.7040204@t2data.se> References: <46B6DA1E.1090502@t2data.se> <46B6EB78.7040204@t2data.se> Message-ID: <200708061507.26107.vda.linux@googlemail.com> On Monday 06 August 2007 10:35, Per Hallsmark wrote: > well... sometimes one can answer oneself... :) > > --- busybox-1.6.1.orig/libbb/lineedit.c 2007-06-30 17:06:40.000000000 +0200 > +++ busybox-1.6.1/libbb/lineedit.c 2007-08-06 11:23:57.000000000 +0200 > @@ -165,10 +165,12 @@ > > if (cmdedit_x >= num) { > cmdedit_x -= num; > +#if 0 > if (num <= 4) { > printf("\b\b\b\b" + (4-num)); > return; > } > +#endif > printf("\033[%uD", num); > return; > } > > > With above patch backspace works ok. > > The \b\b... printf looks rather mystic... guess the author > perhaps wanted something like this instead? > > switch (num) { > case 4: > printf("\b"); > /* fall trough */ > case 3: > printf("\b"); > /* fall trough */ > case 2: > printf("\b"); > /* fall trough */ > case 1: > printf("\b"); > return; > default: > } > > but I wonder what the benefits are... printf("\b\b\b\b" + (4-num)); does exactly the same in 4 times less code. If num==4, it does printf("\b\b\b\b" + 0) => printf("\b\b\b\b") If num==3, it does printf("\b\b\b\b" + 1) => printf("\b\b\b") If num==2, it does printf("\b\b\b\b" + 2) => printf("\b\b") If num==1, it does printf("\b\b\b\b" + 3) => printf("\b") etc The benefits are that we send less bytes than with printf("\033[%uD", num); It's done primarily for the most common case: single [Backspace] key. It's silly to send ESC [ 1 D instead of single backspace char. Now, I wonder why \b for you does not do what it should (that is, going back one char). Can you compile and run this test program? int main(int argc, char **argv) { printf("987654321\b\b\b\b" + argc); fflush(0); sleep(3); puts(""); } When I run it, I see this: # ./a.out 87654321 <---- cursor is under '4' # ./a.out 1 7654321 <---- cursor is under '4' # ./a.out 1 1 654321 <---- cursor is under '4' # ./a.out 1 1 | hexdump -vC 00000000 36 35 34 33 32 31 08 08 08 08 0a |654321.....| 0000000b IOW, both printf("str" + n) and '\b' work right for me. What do you see -- vda From vda.linux at googlemail.com Mon Aug 6 07:10:25 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 15:10:25 +0100 Subject: hush in arm nommu environment In-Reply-To: <46B6DA1E.1090502@t2data.se> References: <46B6DA1E.1090502@t2data.se> Message-ID: <200708061510.25873.vda.linux@googlemail.com> On Monday 06 August 2007 09:21, Per Hallsmark wrote: > Hi all, > > I've tried out the hush shell in busybox 1.6.1. > Seems to work fairly well with the patch last in > this mail. ... > --- busybox-1.6.1.orig/shell/hush.c 2007-06-30 17:06:37.000000000 +0200 > +++ busybox-1.6.1/shell/hush.c 2007-08-02 15:41:22.000000000 +0200 > @@ -658,7 +658,11 @@ > pid_t pid; > > debug_printf_jobs("got tty sig %d in pid %d\n", sig, getpid()); > +#if BB_MMU > pid = fork(); > +#else > + pid = vfork(); > +#endif > if (pid < 0) /* can't fork. Pretend there was no ctrl-Z */ > return; > ctrl_z_flag = 1; I'm afraid this maybe works for some simple scripts, but I'm sure as hell there are nasty bugs. Code does assume that after fork() we create new process. Simply replacing it with vfork is not going to work stably. -- vda From vda.linux at googlemail.com Mon Aug 6 07:11:32 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Mon, 6 Aug 2007 15:11:32 +0100 Subject: applet-request: expand In-Reply-To: <46B60B7C.6080108@zastrow4u.de> References: <46B60B7C.6080108@zastrow4u.de> Message-ID: <200708061511.32929.vda.linux@googlemail.com> On Sunday 05 August 2007 18:40, Alfred Zastrow wrote: > Hello list, > > glibc-2.6.1 compiles fine by using most of the applets of busybox-1.6.1, > but "expand" of coreutils is still missing: > > ----------snip---------------- > sed -e 's,[{}],@&,g' \ > -e 's,/\*\(@.*\)\*/,\1,g' \ > -e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \ > -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g'\ > examples/stpcpy.c | expand > stpcpy.c.texi.new > /bin/sh: line 4: expand: command not found > make[2]: *** [stpcpy.c.texi] Error 127 > make[2]: Leaving directory `/build/glibc-2.6.1/manual' > make[1]: *** [manual/subdir_install] Error 2 > make[1]: Leaving directory `/build/glibc-2.6.1' > make: *** [install] Fehler 2 > ----------snap---------------- > > Is there any chance to get this in? I read the expand manpage. I'd say it's not that hard. Wanna try? ;) -- vda From ml at zastrow4u.de Mon Aug 6 11:56:30 2007 From: ml at zastrow4u.de (Alfred Zastrow) Date: Mon, 06 Aug 2007 20:56:30 +0200 Subject: applet-request: expand In-Reply-To: <200708061511.32929.vda.linux@googlemail.com> References: <46B60B7C.6080108@zastrow4u.de> <200708061511.32929.vda.linux@googlemail.com> Message-ID: <46B76EDE.5020100@zastrow4u.de> Denis Vlasenko schrieb: > On Sunday 05 August 2007 18:40, Alfred Zastrow wrote: >> Hello list, >> >> glibc-2.6.1 compiles fine by using most of the applets of busybox-1.6.1, >> but "expand" of coreutils is still missing: >> >> ----------snip---------------- >> sed -e 's,[{}],@&,g' \ >> -e 's,/\*\(@.*\)\*/,\1,g' \ >> -e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \ >> -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g'\ >> examples/stpcpy.c | expand > stpcpy.c.texi.new >> /bin/sh: line 4: expand: command not found >> make[2]: *** [stpcpy.c.texi] Error 127 >> make[2]: Leaving directory `/build/glibc-2.6.1/manual' >> make[1]: *** [manual/subdir_install] Error 2 >> make[1]: Leaving directory `/build/glibc-2.6.1' >> make: *** [install] Fehler 2 >> ----------snap---------------- >> >> Is there any chance to get this in? > > I read the expand manpage. I'd say it's not that hard. Wanna try? ;) Yes, please. My 1st thought was to create a shell wrapper with `tr`, but a more professional solution (without patching the source) would be much more nicer. Regards Alfred From farmatito at tiscali.it Mon Aug 6 14:00:56 2007 From: farmatito at tiscali.it (Tito) Date: Mon, 6 Aug 2007 23:00:56 +0200 Subject: [PATCH] applet-request: expand In-Reply-To: <46B76EDE.5020100@zastrow4u.de> References: <46B60B7C.6080108@zastrow4u.de> <200708061511.32929.vda.linux@googlemail.com> <46B76EDE.5020100@zastrow4u.de> Message-ID: <200708062300.56120.farmatito@tiscali.it> Hi, this is a first attempt to implement a stripped down version of expand. This version is only little tested so it may contain all sort of bugs. Hints, critics and help in testing and improving it is welcome. bloat-o-meter (after make defconfig and enabling the expand applet) says: function old new delta expand_main - 437 +437 .rodata 121357 121485 +128 packed_usage 22558 22660 +102 applets 3108 3120 +12 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 679/0) Total: 679 bytes Usage is: expand [-i] [-t NUM] [FILE | -] * Options: * -t num Convert tabs to num spaces (default 8 spaces). * * Caveat: this version doesn't accept tab lists and * therefore isn't conform to The Open Group Base * Specifications Issue 6. * * -i Only convert initial tabs on each line to spaces. Ciao, Tito -------------- next part -------------- A non-text attachment was scrubbed... Name: expand.patch Type: text/x-diff Size: 5052 bytes Desc: not available Url : http://busybox.net/lists/busybox/attachments/20070806/61687011/attachment.bin From dave at cray.com Mon Aug 6 18:26:57 2007 From: dave at cray.com (David Updegraff) Date: Mon, 06 Aug 2007 20:26:57 -0500 Subject: udhcp lease bug Message-ID: Hi. udhcp keeps sending out same IPs to diff. macs w/o this patch when a bunch boot at the same time. Annoying. ----------snip----- svn diff networking/udhcp/leases.c Index: networking/udhcp/leases.c =================================================================== --- networking/udhcp/leases.c (revision 19415) +++ networking/udhcp/leases.c (working copy) @@ -33,7 +33,7 @@ for (j = 0; j < 16 && !chaddr[j]; j++); for (i = 0; i < server_config.max_leases; i++) - if ((j != 16 && memcmp(leases[i].chaddr, chaddr, 16) != 0) + if ((j != 16 && memcmp(leases[i].chaddr, chaddr, 16) == 0) || (yiaddr && leases[i].yiaddr == yiaddr) ) { memset(&(leases[i]), 0, sizeof(struct dhcpOfferedAddr)); -----------------snip-------- From jakolee at gmail.com Mon Aug 6 21:51:16 2007 From: jakolee at gmail.com (Jako Lee) Date: Tue, 7 Aug 2007 12:51:16 +0800 Subject: Httpd serve multiple pages Message-ID: <7c4904020708062151o62d20a64s474398d87713e117@mail.gmail.com> Hi all, How do I serve multiple pages using httpd for a single user? Right now I have a main page with a link to another page on my Linux directory. After logging in I can see the main page but when I click on the link it tell me that it can't find the server (both the main page and the linked page are in the same directory). However, if the link is set to "Google" or "Yahoo" homepage it will work fine. I had searched about busybox at forum and I used Google to find "busybox httpd command", "busybox httpd directives" and "busybox httpd.conf" on the Web, but I got no useful hits. I am using BusyBox 1.0.0. and linux kernel is 2.6.18-1.2798.fc6xen. Best regards Jako -------------- next part -------------- An HTML attachment was scrubbed... URL: http://busybox.net/lists/busybox/attachments/20070807/0b068163/attachment.htm From vapier at gentoo.org Mon Aug 6 23:39:10 2007 From: vapier at gentoo.org (Mike Frysinger) Date: Tue, 7 Aug 2007 02:39:10 -0400 Subject: [PATCH] Add Blackfin to scripts/checkstack.pl In-Reply-To: <200708061423.49765.vda.linux@googlemail.com> References: <342715.31112.qm@web62502.mail.re1.yahoo.com> <200708061423.49765.vda.linux@googlemail.com> Message-ID: <200708070239.11570.vapier@gentoo.org> On Monday 06 August 2007, Denis Vlasenko wrote: > On Thursday 02 August 2007 14:54, Alex Landau wrote: > > Hi, > > The patch below adds support for Blackfin to scripts/checkstack.pl. > > Please apply, if it seems appropriate. > > Alex > > Applied, thanks. really you should just pull down the latest version from the kernel git -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://busybox.net/lists/busybox/attachments/20070807/6e610249/attachment.pgp From per.hallsmark at t2data.se Tue Aug 7 00:41:31 2007 From: per.hallsmark at t2data.se (Per Hallsmark) Date: Tue, 07 Aug 2007 09:41:31 +0200 Subject: hush in arm nommu environment In-Reply-To: <200708061507.26107.vda.linux@googlemail.com> References: <46B6DA1E.1090502@t2data.se> <46B6EB78.7040204@t2data.se> <200708061507.26107.vda.linux@googlemail.com> Message-ID: <46B8222B.8000000@t2data.se> Ahhh.. yes I see it know, how could I ever miss :) Well, the testapp works same here, both in my host and target. The hexdump is also same: 00000000 36 35 34 33 32 31 08 08 08 08 0a |654321.....| 0000000b Busybox though behaves different. Extremely odd. It seems then as some offset errors in busybox datasegment for some reasons, since I get some text out from a completely different string. Denis Vlasenko wrote: > On Monday 06 August 2007 10:35, Per Hallsmark wrote: >> well... sometimes one can answer oneself... :) >> >> --- busybox-1.6.1.orig/libbb/lineedit.c 2007-06-30 17:06:40.000000000 +0200 >> +++ busybox-1.6.1/libbb/lineedit.c 2007-08-06 11:23:57.000000000 +0200 >> @@ -165,10 +165,12 @@ >> >> if (cmdedit_x >= num) { >> cmdedit_x -= num; >> +#if 0 >> if (num <= 4) { >> printf("\b\b\b\b" + (4-num)); >> return; >> } >> +#endif >> printf("\033[%uD", num); >> return; >> } >> >> >> With above patch backspace works ok. >> >> The \b\b... printf looks rather mystic... guess the author >> perhaps wanted something like this instead? >> >> switch (num) { >> case 4: >> printf("\b"); >> /* fall trough */ >> case 3: >> printf("\b"); >> /* fall trough */ >> case 2: >> printf("\b"); >> /* fall trough */ >> case 1: >> printf("\b"); >> return; >> default: >> } >> >> but I wonder what the benefits are... > > printf("\b\b\b\b" + (4-num)); > > does exactly the same in 4 times less code. > If num==4, it does printf("\b\b\b\b" + 0) => printf("\b\b\b\b") > If num==3, it does printf("\b\b\b\b" + 1) => printf("\b\b\b") > If num==2, it does printf("\b\b\b\b" + 2) => printf("\b\b") > If num==1, it does printf("\b\b\b\b" + 3) => printf("\b") > etc > > The benefits are that we send less bytes than with printf("\033[%uD", num); > It's done primarily for the most common case: single [Backspace] key. > It's silly to send ESC [ 1 D instead of single backspace char. > > Now, I wonder why \b for you does not do what it should (that is, > going back one char). Can you compile and run this test program? > > int main(int argc, char **argv) { > printf("987654321\b\b\b\b" + argc); > fflush(0); > sleep(3); > puts(""); > } > > When I run it, I see this: > > # ./a.out > 87654321 <---- cursor is under '4' > # ./a.out 1 > 7654321 <---- cursor is under '4' > # ./a.out 1 1 > 654321 <---- cursor is under '4' > # ./a.out 1 1 | hexdump -vC > 00000000 36 35 34 33 32 31 08 08 08 08 0a |654321.....| > 0000000b > > IOW, both printf("str" + n) and '\b' work right for me. > > What do you see > -- > vda From per.hallsmark at t2data.se Tue Aug 7 00:51:38 2007 From: per.hallsmark at t2data.se (Per Hallsmark) Date: Tue, 07 Aug 2007 09:51:38 +0200 Subject: hush in arm nommu environment In-Reply-To: <200708061510.25873.vda.linux@googlemail.com> References: <46B6DA1E.1090502@t2data.se> <200708061510.25873.vda.linux@googlemail.com> Message-ID: <46B8248A.2050703@t2data.se> well... the exact same style is made in other places for nommu portability. I only have two scripts in my target, one rc and one upgrade, both works fine starting background stuff etc. They do some if's, starting background processes, variabel handling and so on. Since, with working backspace ;-), hush is such a better solution than sash I'd rather stick with hush and take eventual bugs/"nommu features" as they come. So, while not perfect, it's better than other current solutions at least for our usage. Denis Vlasenko wrote: > On Monday 06 August 2007 09:21, Per Hallsmark wrote: >> Hi all, >> >> I've tried out the hush shell in busybox 1.6.1. >> Seems to work fairly well with the patch last in >> this mail. > ... >> --- busybox-1.6.1.orig/shell/hush.c 2007-06-30 17:06:37.000000000 +0200 >> +++ busybox-1.6.1/shell/hush.c 2007-08-02 15:41:22.000000000 +0200 >> @@ -658,7 +658,11 @@ >> pid_t pid; >> >> debug_printf_jobs("got tty sig %d in pid %d\n", sig, getpid()); >> +#if BB_MMU >> pid = fork(); >> +#else >> + pid = vfork(); >> +#endif >> if (pid < 0) /* can't fork. Pretend there was no ctrl-Z */ >> return; >> ctrl_z_flag = 1; > > I'm afraid this maybe works for some simple scripts, but I'm sure as hell > there are nasty bugs. Code does assume that after fork() we create > new process. Simply replacing it with vfork is not going to work stably. > -- > vda From hinko.kocevar at cetrtapot.si Tue Aug 7 00:38:50 2007 From: hinko.kocevar at cetrtapot.si (hinko.kocevar at cetrtapot.si) Date: Tue, 07 Aug 2007 09:38:50 +0200 Subject: Httpd serve multiple pages In-Reply-To: <7c4904020708062151o62d20a64s474398d87713e117@mail.gmail.com> References: <7c4904020708062151o62d20a64s474398d87713e117@mail.gmail.com> Message-ID: <46B8218A.1090306@cetrtapot.si> Jako Lee wrote: > Hi all, > > How do I serve multiple pages using httpd for a single user? For me it works the same as on all other web servers - put them in the web root (or subdirs of web root) directory and navigate to that address. > Right now I have a main page with a link to another page on > my Linux directory. After logging in I can see the main page > but when I click on the link it tell me that it can't find > the server (both the main page and the linked page are in > the same directory). However, if the link is set to "Google" > or "Yahoo" homepage it will work fine. Could you post your html pages so that we can take a look? regards, hinko -- ?ETRTA POT, d.o.o., Kranj Planina 3 4000 Kranj Slovenia, Europe Tel. +386 (0) 4 280 66 03 E-mail: hinko.kocevar at cetrtapot.si Http: www.cetrtapot.si From alexander.griesser at lkh-vil.or.at Tue Aug 7 05:00:08 2007 From: alexander.griesser at lkh-vil.or.at (Alexander Griesser) Date: Tue, 07 Aug 2007 14:00:08 +0200 Subject: Again, troubles with uploading files using busybox httpd Message-ID: <46B85EC8.1030800@lkh-vil.or.at> Hi folks! This one seems to be a duplicate of a previous bug report for bb 1.3.1/1.4.1, here's the link: http://www.busybox.net/lists/busybox/2007-February/026289.html Currently (latest svn version), I'm unable to upload files onto my busybox installation running busybox httpd. The problem is, that the `cat` command never finishes after it wrote the uploaded file successfully to the temporary location, that means uploading works, but after the upload has finished, `cat` doesn't quit. I also tried `dd of=$TMPOUT` => didn't work either (hangs after upload has finished). As mentioned in the above link, I had a similar problem a few months ago and have looked at the patch posted back then from Denis, but wasn't able to merge it to the current httpd.c (don't even know if it would have made sense ;) ). Any ideas, what's going wrong here? The sample cgi-script for uploading the file follows: ----------[ uploadconfig.cgi ] ------------------------- #!/bin/sh # parameters: # $1 - file destination upload_file() { TMPOUT=$(mktemp /tmp/XXXXXX) # upload the file to $TMPOUT cat >$TMPOUT # get the line count and remove the first 4 and the last 2 lines # of the uploaded file (these lines contain boundery and content-type # information only) LINE_COUNT=$(wc -l $TMPOUT | awk "-F " '{ print $1 }') if [ $LINE_COUNT -le 6 ]; then RETURN=1 else UPPER_BOUND=$(( $LINE_COUNT - 4 )) LOWER_BOUND=$(( $UPPER_BOUND - 2 )) tail -n $UPPER_BOUND $TMPOUT | head -n $LOWER_BOUND > $1 RETURN=$? fi rm -f $TMPOUT if [ "$RETURN" = "0" ]; then echo "

Upload successful.

" else echo "

Error while uploading the file!

" fi return $RETURN } echo "

Upload configuration file

" if [ "$REQUEST_METHOD" = "POST" ]; then if upload_file /system/etc/lxtc-config; then echo "
"
    cat /system/etc/lxtc-config
    echo "
" fi else echo "
" echo "" echo "" echo "
" fi ---------------------------------- 8< -------------------- ciao, -- Alexander Griesser (Netzwerkadministration) E-Mail: alexander.griesser at lkh-vil.or.at | Web: http://www.lkh-vil.or.at KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach Tel.: +43 4242 208 3061 | Fax.: +43 4242 971 3061 From farmatito at tiscali.it Tue Aug 7 06:16:28 2007 From: farmatito at tiscali.it (Tito) Date: Tue, 7 Aug 2007 15:16:28 +0200 Subject: [PATCH] applet-request: expand In-Reply-To: <46B8671B.3030107@bfs.de> References: <46B60B7C.6080108@zastrow4u.de> <200708062300.56120.farmatito@tiscali.it> <46B8671B.3030107@bfs.de> Message-ID: <200708071516.28795.farmatito@tiscali.it> On Tuesday 07 August 2007 14:35:39 walter harms wrote: > do you do unexpand also ? > re, > wh Hi, i ignored the existence of expand/unexpand :-) till yesterday.... If there is some interest I can try, or are you volunteering? It should be possible to merge expand/unexpand into a single applet (as long as we don't try to do the expand -t list files stuff) but before attempting it I would like the current code to be better tested, debugged and optimized, as it is mostly untested. Ciao, Tito From ml at zastrow4u.de Tue Aug 7 12:14:09 2007 From: ml at zastrow4u.de (Alfred Zastrow) Date: Tue, 07 Aug 2007 21:14:09 +0200 Subject: [PATCH] applet-request: expand In-Reply-To: <200708062300.56120.farmatito@tiscali.it> References: <46B60B7C.6080108@zastrow4u.de> <200708061511.32929.vda.linux@googlemail.com> <46B76EDE.5020100@zastrow4u.de> <200708062300.56120.farmatito@tiscali.it> Message-ID: <46B8C481.4080904@zastrow4u.de> Tito schrieb: > Hi, > this is a first attempt to implement a stripped down version of expand. > This version is only little tested so it may contain all sort of bugs. > Hints, critics and help in testing and improving it is welcome. Thanks a lot, it works. I didn't compare the results in detail yet, but compiling glibc-2.6.1 doesn't break anymore. Will this patch go into the next busybox release? regards Alfred From landau_alex at yahoo.com Wed Aug 8 05:09:27 2007 From: landau_alex at yahoo.com (Alex Landau) Date: Wed, 8 Aug 2007 05:09:27 -0700 (PDT) Subject: [PATCH] httpd: Support "Status: " header in CGI script Message-ID: <937796.3923.qm@web62503.mail.re1.yahoo.com> Hi, The attached patch adds to httpd support for a Status header. This header (as per the CGI spec) is used by CGI scripts to ask the server to send an HTTP response different than 200. Why is it needed, and why the script can't send the "HTTP/1.0 302 Found" (or similar) by itself is beyond me... PHP (at least in CGI mode) sends "Status: 302" and the appropriate Location when running header('Location: something'). That was my motivation for the patch. Due to efficiency and space considerations, when httpd receives a "Status: xxx" header it sends "HTTP/1.0 xxx" without the textual code representation (e.g. "HTTP/1.0 302" instead of "HTTP/1.0 302 Found"). This works at least with Firefox 2.0.0.6 on Linux and IE 6 on, well..., Windows. If you think it's worth it, I can add proper message ("Found" etc.) handling. Alex ____________________________________________________________________________________ Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. http://autos.yahoo.com/carfinder/ -------------- next part -------------- A non-text attachment was scrubbed... Name: httpd.patch Type: text/x-patch Size: 947 bytes Desc: 4014077785-httpd.patch Url : http://busybox.net/lists/busybox/attachments/20070808/f5c26d95/attachment.bin From creder at digitalcpt.com Wed Aug 8 13:39:08 2007 From: creder at digitalcpt.com (Christopher Reder) Date: Wed, 8 Aug 2007 15:39:08 -0500 Subject: 'df' output Message-ID: <011101c7d9fc$2b1dd5b0$2600a8c0@engineering5> I am trying to figure out more information on the 'df' output and how it may indicate how something is setup wrong with my kernel. If this is the wrong list to ask the question, I'll be glad to repost elsewhere. If you look at the output below, you'll see that I have 1 mtd block setup on a nand flash. This flash is 256 MB. You can see that in the iomem output and in the mtd output. However, when I run 'df', it shows the there is 5.7 Meg. I am wondering why it is and/or what it is looking at to see that when everything else in the kernel is showing correctly. If anyone can direct me in the correct spot, or tell me to repost to a kernel list, I'll be glad to do it. major minor #blocks name 31 0 262144 mtdblock0 254 0 1985024 mmcblk0 254 1 1983619 mmcblk0p1 # cat iomem 00300000-003fffff : at91_ohci 00300000-003fffff : ohci_hcd 20000000-21ffffff : System RAM 2002c000-202a1fff : Kernel text 202a2000-202d0fd7 : Kernel data 40000000-4fffffff : at91_nand 80000000-8017ffff : FPGA video memory 80000000-8017ffff : dcifb mem 80800000-80800004 : FPGA video registers 80800000-80800004 : dcifb regs fefbc000-fefbffff : at91_ether fefff200-fefff3ff : atmel_usart.0 fefff200-fefff3ff : atmel_serial fffb4000-fffb7fff : at91_mci fffb4000-fffb7fff : at91_mci fffe0000-fffe3fff : at91_spi.0 fffe0000-fffe3fff : at91_spi # cat mtd dev: size erasesize name mtd0: 10000000 00020000 "NAND1" # df Filesystem Size Used Available Use% Mounted on /dev/mtdblock0 5.7M 3.3M 2.4M 58% / # static struct mtd_partition __initdata dci_nand_partition[] = { { .name = "NAND1", .offset = 0, .size = MTDPART_SIZ_FULL, }, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://busybox.net/lists/busybox/attachments/20070808/da70cd00/attachment.htm From farmatito at tiscali.it Wed Aug 8 23:27:07 2007 From: farmatito at tiscali.it (Tito) Date: Thu, 9 Aug 2007 08:27:07 +0200 Subject: [PATCH] applet-request: expand In-Reply-To: <200708062300.56120.farmatito@tiscali.it> References: <46B60B7C.6080108@zastrow4u.de> <46B76EDE.5020100@zastrow4u.de> <200708062300.56120.farmatito@tiscali.it> Message-ID: <200708090827.07423.farmatito@tiscali.it> On Monday 06 August 2007 23:00:56 Tito wrote: > Hi, > this is a first attempt to implement a stripped down version of expand. > This version is only little tested so it may contain all sort of bugs. > Hints, critics and help in testing and improving it is welcome. > > bloat-o-meter (after make defconfig and enabling the expand applet) says: > function old new delta > expand_main - 437 +437 > .rodata 121357 121485 +128 > packed_usage 22558 22660 +102 > applets 3108 3120 +12 > ------------------------------------------------------------------------------ > (add/remove: 1/0 grow/shrink: 3/0 up/down: 679/0) Total: 679 bytes > > Usage is: expand [-i] [-t NUM] [FILE | -] > > * Options: > * -t num Convert tabs to num spaces (default 8 spaces). > * > * Caveat: this version doesn't accept tab lists and > * therefore isn't conform to The Open Group Base > * Specifications Issue 6. > * > * -i Only convert initial tabs on each line to spaces. > > Ciao, > Tito > Hi Denis, please don't apply this patch fro the moment, I'm working on an improved one with less bugs, tests for our test suite and also unexpand. Need a few days for it. Ciao, Tito From vda.linux at googlemail.com Thu Aug 9 00:53:02 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 9 Aug 2007 08:53:02 +0100 Subject: udhcp lease bug In-Reply-To: References: Message-ID: <200708090853.02188.vda.linux@googlemail.com> On Tuesday 07 August 2007 02:26, David Updegraff wrote: > Hi. > > udhcp keeps sending out same IPs to diff. macs w/o this patch when a > bunch boot at the same time. Annoying. Thanks for finding it. Fixed in svn. -- vda From alexander.griesser at lkh-vil.or.at Thu Aug 9 01:00:43 2007 From: alexander.griesser at lkh-vil.or.at (Alexander Griesser) Date: Thu, 09 Aug 2007 10:00:43 +0200 Subject: Again, troubles with uploading files using busybox httpd In-Reply-To: <46B85EC8.1030800@lkh-vil.or.at> References: <46B85EC8.1030800@lkh-vil.or.at> Message-ID: <46BAC9AB.6010600@lkh-vil.or.at> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander Griesser wrote: > Hi folks! > > This one seems to be a duplicate of a previous bug report for bb > 1.3.1/1.4.1, here's the link: > > http://www.busybox.net/lists/busybox/2007-February/026289.html Noone else experiencing this problem? ciao, - -- Alexander Griesser (Netzwerkadministration) E-Mail: alexander.griesser at lkh-vil.or.at | Web: http://www.lkh-vil.or.at KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach Tel.: +43 4242 208 3061 | Fax.: +43 4242 971 3061 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGusmr66HVD6KUm1oRAk/OAJ0VI7Ktfr+hzut5OAqPK3cSRZHi7ACfci2b Lw5W3mDE/XAPwjYgkexNHMU= =amen -----END PGP SIGNATURE----- From vda.linux at googlemail.com Thu Aug 9 01:03:03 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 9 Aug 2007 09:03:03 +0100 Subject: Httpd serve multiple pages In-Reply-To: <7c4904020708062151o62d20a64s474398d87713e117@mail.gmail.com> References: <7c4904020708062151o62d20a64s474398d87713e117@mail.gmail.com> Message-ID: <200708090903.03970.vda.linux@googlemail.com> On Tuesday 07 August 2007 05:51, Jako Lee wrote: > Hi all, > > How do I serve multiple pages using httpd for a single user? > Right now I have a main page with a link to another page on > my Linux directory. After logging in I can see the main page > but when I click on the link it tell me that it can't find > the server (both the main page and the linked page are in > the same directory). However, if the link is set to "Google" > or "Yahoo" homepage it will work fine. Let's say you have first_page.htm and second_page.htm in the same dir. "Second page is here" should work. Please post these two pages (or their simplified versions if they are big), explain in which directory do you put these files and how do you start httpd (exact command line). Will try to reproduce here. -- vda From vda.linux at googlemail.com Thu Aug 9 01:17:31 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 9 Aug 2007 09:17:31 +0100 Subject: Fw: Bug in PS command In-Reply-To: <019101c7d8c1$2cec9b60$0402a8c0@seorot377rl65q> References: <019101c7d8c1$2cec9b60$0402a8c0@seorot377rl65q> Message-ID: <200708090917.31711.vda.linux@googlemail.com> On Tuesday 07 August 2007 08:04, Amit Saha wrote: > I found one Bug in PS command of BusyBox 1.00. But we are on 1.6.1... > While the ps is getting size of output screen, it is passing the parameter 0 instead of 1, procps/ps.c line 56. There is only "}" on that line in current busybox. It took me a bit of time to figure out what do you mean. Fixed now. Thanks. -- vda From himainu-ynakam at miomio.jp Tue Aug 7 21:38:45 2007 From: himainu-ynakam at miomio.jp (himainu-ynakam at miomio.jp) Date: Wed, 08 Aug 2007 13:38:45 +0900 Subject: [patch][BusyBox] Domain assignment support for SELinux/AppArmor/LIDS Message-ID: <200708080438.l784cj4N015640@mbox.iijmio-mail.jp> Hello. We would like to suggest Secure OSes(such as SELinux/AppArmor/LIDS) domain assignment support for BusyBox. This work is done by Hiroshi Shinji. 1. Background Secure OSes such as SELinux, AppArmor and LIDS can assign domain to processes. "Domain" means set of access rights. Domain is assinged to processes at the time of "exec" system call. # This is a little similar to "suid" feature of Linux. For example, in the case of SELinux, /sbin/syslogd is assigned syslogd_t domain at the execution time of /sbin/syslogd. syslogd_t are allowed to read syslogd.conf, write log files, etc. However, current BusyBox does not suitable for assigning domains. Because BusyBox is a single file that is called through a lot of links. Secure OS treats "/sbin/syslogd" and "/sbin/httpd" as "/bin/busybox". So, /sbin/syslogd and /sbin/httpd run as the same domain. Known solutions to this problem is preparing wrapper program that calls applet. ? For example, /sbin/syslogd is a small C program that calls "/bin/busybox syslogd". Then, at the execution of /sbin/syslogd, syslogd_t domain is assigned and "/bin/busybox syslogd" is called and inherits assinged domain(syslogd_t). However, such wrapper consumes storage(more than 1k byte per wrapper). For detailed description about this problem, Yusuke Sato wrote documentation: http://www.selinux.gr.jp/LIDS-JP/LIDS_en/document/general/web_lids_busybox/main.html 2. Our solution Shinji came up with one idea. He thought "script wrappper" like below. If you enabled "INSTALL_APPLET_SCRIPT_WRAPPERS", wrappers like below are installed. The contents of "/sbin/syslogd" is following. #!/bin/busybox It is only 15 byte. When /sbin/syslogd is executed, "/bin/busybox /sbin/syslogd " is called. To achive above, we had to modify applets.c - applet_name = argv[0]; - run_applet_and_exit(argv[0], argv); + applet_name = bb_get_last_path_component(argv[0]); + run_applet_and_exit(applet_name, argv); We tried the patch for SELinux and AppArmor. And domains were assigned sucessfully! 3. Limitation Programs that are used as interpreter can not be installed as script wrapper. It is due to limitation of exec(interpreter can not be called twice). For example, /bin/sh can not be installed as script wrapper. If /bin/sh is installed as script wrapper, shell scripts do not run. In interpreting #!/bin/sh -> /bin/sh is #!/bin/busybox, -> #! is called twice -> exec system call fails(limitation of exec system call). In our patch, sh is installed as symlink or hard link by default (you can install it as script wrapper if you still need). Assigning domain is critical to secure OSes. We want way to assign to domains to busybox applets. Please review this patch and consider merging. Regards, Yuichi Nakamura JSELUG(Japan SELinux Users Group) -------------- next part -------------- A non-text attachment was scrubbed... Name: domain_assign.patch Type: application/octet-stream Size: 5261 bytes Desc: not available Url : http://busybox.net/lists/busybox/attachments/20070808/2cf3f159/attachment-0001.obj From vda.linux at googlemail.com Thu Aug 9 01:52:34 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 9 Aug 2007 09:52:34 +0100 Subject: Again, troubles with uploading files using busybox httpd In-Reply-To: <46BAC9AB.6010600@lkh-vil.or.at> References: <46B85EC8.1030800@lkh-vil.or.at> <46BAC9AB.6010600@lkh-vil.or.at> Message-ID: <200708090952.34639.vda.linux@googlemail.com> On Thursday 09 August 2007 09:00, Alexander Griesser wrote: > Alexander Griesser wrote: > > Hi folks! > > > > This one seems to be a duplicate of a previous bug report for bb > > 1.3.1/1.4.1, here's the link: > > > > http://www.busybox.net/lists/busybox/2007-February/026289.html > > Noone else experiencing this problem? Sorry, had no time to look at it, yet. Will try today in the evening. -- vda From Alexander at Kriegisch.name Thu Aug 9 05:27:55 2007 From: Alexander at Kriegisch.name (Alexander Kriegisch) Date: Thu, 09 Aug 2007 14:27:55 +0200 Subject: Again, troubles with uploading files using busybox httpd In-Reply-To: <46B85EC8.1030800@lkh-vil.or.at> References: <46B85EC8.1030800@lkh-vil.or.at> Message-ID: <46BB084B.5020708@Kriegisch.name> Hi Alexander! Your uploadconfig.cgi looks interesting, some months ago I also tried to handle form-based uploads in shell script, but felt it was too tricky and unstable. What if another browser sends more headers? Why read the uploaded file several times for line counting, head and tail operations? and so forth. [OT] I use httpd (currently BB 1.5.1) on a mipsel platform (embedded router system) in combination with Haserl (http://haserl.sourceforge.net/) as a CGI handler and am very satisfied. Maybe this is an option to be considered for you, too. The latest Haserl release 0.9.18 comes with an interesting new option which has been incorporated by the author upon my request: The upload is not stored as a temp-file, but written into a pipe (FIFO). A handler for reading the FIFO is called asynchronously, so a shell script can extract a tar archive on the fly, for example. This is an advantage on platforms with limited memory if you want to avoid double memory consumption (archive plus extracted content). And the best thing is that the upload is read once and only once. Haserl is lean and the very simple template mechanism integrates beautifully in shell scripts (or Lua scripts, if you prefer). BTW: No, I don't get money for promoting Haserl, I am just a satisfied user. ;-) [/OT] Back to your shell script: I think it would be better to develop a version which reads the content length header and then acts accordingly, not reading linewise, but bytewise, even though in your case you always seem to upload text files or maybe base64-encoded binaries. But don't forget that binary uploads are also allowed. So if you want a more general solution, you might have to improve your script considerably. Best regards -- Alexander Kriegisch From alexander.griesser at lkh-vil.or.at Thu Aug 9 06:12:54 2007 From: alexander.griesser at lkh-vil.or.at (Alexander Griesser) Date: Thu, 09 Aug 2007 15:12:54 +0200 Subject: Again, troubles with uploading files using busybox httpd In-Reply-To: <46BB084B.5020708@Kriegisch.name> References: <46B85EC8.1030800@lkh-vil.or.at> <46BB084B.5020708@Kriegisch.name> Message-ID: <46BB12D6.6040806@lkh-vil.or.at> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander Kriegisch wrote: > Your uploadconfig.cgi looks interesting, some months ago I also tried to > handle form-based uploads in shell script, but felt it was too tricky > and unstable. What if another browser sends more headers? Well, I never thought about that, as Mozilla and IE6/7 worked with it. > Why read the uploaded file several times for line counting, > head and tail operations? Because I had no other idea about how to do that without investing much time into it. > I use httpd (currently BB 1.5.1) on a mipsel platform (embedded router > system) in combination with Haserl (http://haserl.sourceforge.net/) as a > CGI handler and am very satisfied. Will have a look at it, but doesn't haserl only read what it gets from busybox httpd? To me it seems as if the upload never finishes because of a bug in httpd and although using haserl and pipes and whatsoever, wouldn't that wait for the end of the stream too? > The upload is not stored as a temp-file, but written into a pipe (FIFO). Not really a necessity for me currently, but it sounds great. > Haserl is lean and the very simple template mechanism integrates > beautifully in shell scripts (or Lua scripts, if you prefer). Unfortunately, there are no examples on the website, but I'll try to build a demo script with haserl just to see how it fairs. > Back to your shell script: I think it would be better to develop a > version which reads the content length header and then acts accordingly, Well, that was what came to my mind at first after recognizing that the upload of the file works, but afterwards the read() doesn't finish. Reading only n bytes of data would - of course - work around this problem, but mentioning the bug is worth it, because it was fixed some releases ago (as stated in my first mail) and has now somehow been reintroduced. > But don't forget that binary uploads are also allowed. So if you want > a more general solution, you might have to improve your script > considerably. I once had an "upload firmware" button too which uploaded base64 converted firmware files, but wasn't satisfied with this solution as the resulting converted files were at least twice as big as the original file :-/ So maybe the use of haserl will reintroduce firmware uploads as well ;) Thanks for the hint so far, will see what I can accomplish. ciao, - -- Alexander Griesser (Netzwerkadministration) E-Mail: alexander.griesser at lkh-vil.or.at | Web: http://www.lkh-vil.or.at KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach Tel.: +43 4242 208 3061 | Fax.: +43 4242 971 3061 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGuxLW66HVD6KUm1oRAmARAJ47lcf7VfE8FXNqyxOUiGVNkBH2gACeJfdE pAvty+SHejydI7wl2PV/DCA= =nwYv -----END PGP SIGNATURE----- From vshrirama at gmail.com Thu Aug 9 09:00:11 2007 From: vshrirama at gmail.com (Ram) Date: Thu, 9 Aug 2007 21:30:11 +0530 Subject: Busybox utils to set u-boot environment? Message-ID: <8bf247760708090900v6a715520hc7fecc7d76e17cbf@mail.gmail.com> Hi, Are there any busybox utility to get and set the u-boot environments from linux. Regards, sriram From mats at blue2net.com Thu Aug 9 10:42:23 2007 From: mats at blue2net.com (Mats Erik Andersson) Date: Thu, 09 Aug 2007 19:42:23 +0200 Subject: Rewritten autoconf and build directory Message-ID: <1186681343.4744.78.camel@Blue2net-mats.bellman.mea> Hello all, I stumbled on a possible issue with today's svn edition of Busybox. There was no problem whatsoever to build Busybox 1.6.1 fresh out of the box into a separate build directory, but when I tried the same with svn trunk of today, the changed autoconf handling gives a warning and then an error is caused by applets/usage.c and include/applets.h, thus breaking an chance of progress early on. I am not sure whether the fault is mine or not, but I thought it best to point it out anyway. I will revert to 1.6.1 for the moment, since I have no time to spare in the near future. Regards Mats E A From swu at rgbnetworks.com Thu Aug 9 11:18:05 2007 From: swu at rgbnetworks.com (Songyan Wu) Date: Thu, 9 Aug 2007 11:18:05 -0700 Subject: Is busybox support doPost? Message-ID: <9964EE0EF7D1234C8ADD051DB304E0CC08EFDD@MSG10001.rgbnetworks.com> Hi, I am working on busybox web server. I tried HTML form with POST method, it does not looks support. Is it true? Thanks, Songyan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://busybox.net/lists/busybox/attachments/20070809/50daa7cc/attachment.htm From vda.linux at googlemail.com Thu Aug 9 12:24:08 2007 From: vda.linux at googlemail.com (Denis Vlasenko) Date: Thu, 9 Aug 2007 20:24:08 +0100 Subject: Is busybox support doPost? In-Reply-To: <9964EE0EF7D1234C8ADD051DB304E0CC08EFDD@MSG10001.rgbnetworks.com> References: <9964EE0EF7D1234C8ADD051DB304E0CC08EFDD@MSG10001.rgbnetworks.com> Message-ID: <1158166a0708091224m543775