set_loop tries to create 1048575 loop devices

2014-01-20 Thread Ralf Friedl
Hi I just had mount create a large number of loop devices before I interrupted it. The reason is that the loop module is not loaded in the kernel, but it would be better to have an error message instead. Here ist the strace output: stat64("/dev/loop0", 0x7ffd8840)= -1 ENOENT (No such

Re: set_loop tries to create 1048575 loop devices

2014-01-21 Thread Ralf Friedl
Lauri Kasanen wrote: On Mon, Jan 20, 2014, at 18:52, Ralf Friedl wrote: Hi I just had mount create a large number of loop devices before I interrupted it. The reason is that the loop module is not loaded in the kernel, but it would be better to have an error message instead. ... I don't

Re: set_loop tries to create 1048575 loop devices

2014-01-21 Thread Ralf Friedl
Denys Vlasenko schrieb: Yes, good idea. Please try current git, I pushed a fix there. Works very well, thank you. Ralf ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH] correct_password: Handle NULL from crypt

2014-02-04 Thread Ralf Friedl
Lauri Kasanen wrote: As with many other software, busybox was also broken by the glibc >= 2.17 behavior change. Now crypt() returns NULL if either salt or password is invalid. This causes busybox 1.21, 1.22, and git su to segfault, when you just press enter at the password prompt (configured to

Re: Ntpd config file support

2014-03-18 Thread Ralf Friedl
Hi Laszlo First, please either write your message below the quotes, or omit the quotes. Especially don't quote parts that are not relevant to your message. Laszlo Papp wrote: At least three people expressed that it is about convenience, a useful one. Well, all of them didn't provide a convinc

Re: Ntpd config file support

2014-03-18 Thread Ralf Friedl
Laszlo Papp wrote: On Tue, Mar 18, 2014 at 9:17 PM, Ralf Friedl wrote: First, please either write your message below the quotes, or omit the quotes. Especially don't quote parts that are not relevant to your message. I have no idea what point you are trying to make in here, sorry, nor

Re: Ntpd config file support

2014-03-22 Thread Ralf Friedl
Mike Dean wrote: You mentioned earlier that code is never freed from memory. If you're this concerned with bloat, why don't you fix your problem of never deallocating the init code instead of worrying about some small feature like this? The Linux kernel does this; that's why you see the mess

Re: [PATCH] Ntpd config file support

2014-03-22 Thread Ralf Friedl
Harald Becker wrote: Your program will fail on lines starting with the word server (eg. serverxyz), that is it does not check for clear word boundary and gives wrong results in that case. The program will not fail for serverxyz, it will add a server "xyz". This may be a bug or a feature :-) w

Re: /proc//cmdline and udhcpcd

2014-03-26 Thread Ralf Friedl
Matt Whitlock wrote: On Tuesday, 25 March 2014, at 10:52 pm, Cristian Ionescu-Idbohrn wrote: I find out that using that option: -x hostname:foo ^ shows up in /proc//cmdline as: -x hostname foo ^ /proc//cmdline reflects any changes that th

Re: dc hitting a compiler bug, or undefined behavior

2014-03-30 Thread Ralf Friedl
Lauri Kasanen wrote: I'm seeing busybox dc acting funny when compiled with some versions of gcc. This is on busybox git. The x86 binary busybox_unstripped and config are attached. gcc 4.2.2 - ok gcc 4.7.2: nc 10 1 add p 2.738e+93 So either bb is hitting a compiler bug, or undefined behavior som

Re: dc hitting a compiler bug, or undefined behavior

2014-03-30 Thread Ralf Friedl
Lauri Kasanen schrieb: On Sun, Mar 30, 2014, at 15:05, Ralf Friedl wrote: I'm seeing busybox dc acting funny when compiled with some versions of gcc. This is on busybox git. The x86 binary busybox_unstripped and config are attached. gcc 4.2.2 - ok gcc 4.7.2: nc 10 1 add p 2.738e+93 So e

Re: dc hitting a compiler bug, or undefined behavior

2014-03-30 Thread Ralf Friedl
Lauri Kasanen wrote: On Sun, Mar 30, 2014, at 18:26, Ralf Friedl wrote: What's even worse is that adding any output to push(), even a puts("hi") that does not print the argument or any of the stack vars, fixes it. So something magic is going on inside the GCC optimization, I&#

Re: dc hitting a compiler bug, or undefined behavior

2014-03-31 Thread Ralf Friedl
Lauri Kasanen wrote: On Mon, Mar 31, 2014, at 0:37, Ralf Friedl wrote: Are you using some special compiler options, especially regarding parameter passing in registers and stack alignment? None, I'm afraid. CFLAGS etc are all unset. See later on for the gcc defaults too. Thanks fo

Re: Receiving two REMOVE actions for the same USB drive

2014-04-28 Thread Ralf Friedl
Mason wrote: Mason wrote: Hello everyone, I'm using a vendor-supplied software stack which includes a "customized" Linux kernel (2.6.28) along with busybox v1.20.2 I'm seeing something strange from mdev when I unplug my USB mass storage device: the REMOVE action is notified twice with two diff

Re: [PATCH 1/1] hwclock: Verify RTC file descriptor; use reentrant functions

2014-04-29 Thread Ralf Friedl
Bryan Evenson wrote: Similarly, the returned pointer of ctime and localtime was being used without checking if the pointer was valid. One of these calls was causing a call to hwclock to enter an uninterruptable sleep when the invalid hwclock access occurred. An uninterruptable sleep is a kernel

Re: [PATCH] Add Linux gpio sysfs applets

2014-04-29 Thread Ralf Friedl
Sascha Hauer wrote: This adds applets for manipulating gpios under Linux via sysfs. It uses the /sys/class/gpio API to set direction and value of gpios and to read back the actual value. The applets work like the corresponding C functions in the kernel: gpio_set_value gpio_get_value gpio_dire

Re: [PATCH 0/2] fix find_execable function and which code cleanup

2014-05-01 Thread Ralf Friedl
Tito wrote: while trying to cleanup the debianutils/which command I've spotted a minor glitch in bb's find_execable function as it is not able to handle zero lenght prefixes in the PATH variable: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html 8.3 Other Environment Variab

Re: [PATCH 0/2] fix find_execable function and which code cleanup

2014-05-02 Thread Ralf Friedl
Tito wrote: On Thursday 01 May 2014 21:30:25 Ralf Friedl wrote: Tito wrote: while trying to cleanup the debianutils/which command I've spotted a minor glitch in bb's find_execable function as it is not able to handle zero lenght prefixes in the PATH variable: http://pubs.ope

Re: [PATCH 0/2] fix find_execable function and which code cleanup

2014-05-02 Thread Ralf Friedl
Tito wrote: That's it about PATCH 1. There is still PATCH 2 Your patch searches in PATH for dir/file if dir/file is not executable. The normal behavior is to not search PATH if the argument contains a '/'. If you rewrite "which" anyway, you could also change the following points: - Remove

Re: [PATCH 1/1] hwclock: Verify RTC file descriptor; use reentrant functions

2014-05-06 Thread Ralf Friedl
Bryan Evenson wrote: Well, this is leading into some interesting questions about responsibility. I reported my results on the linux-arm-kernel mailing list, and it is possible I uncovered a bug in the Atmel RTC driver. I'll know a little more by this time tomorrow on that issue. I'd say Busybo

Re: Changing the user name

2014-05-13 Thread Ralf Friedl
Laszlo Papp wrote: is this possible? I am looking for something like "usermod -l" on desktop. Alternatively, I have to look into the get/setpwent syscalls? You can also use sed to change /etc/passwd sed -i -e /s^olduser:/newuser:/ /etc/passwd ___ bus

Re: Changing the user name

2014-05-13 Thread Ralf Friedl
Laszlo Papp wrote: On Wed, May 14, 2014 at 7:28 AM, Ralf Friedl wrote: Laszlo Papp wrote: is this possible? I am looking for something like "usermod -l" on desktop. Alternatively, I have to look into the get/setpwent syscalls? You can also use sed to change /etc/passwd sed -i -e

Re: Proposition: use a hashtable instead of bsearch to locate applets

2014-05-30 Thread Ralf Friedl
Rich Felker wrote: On Fri, May 30, 2014 at 12:13:41PM +0100, Laurent Bercot wrote: On 05/30/2014 10:16 AM, Bartosz Gołaszewski wrote: I've checked the times just by looking up all the applets in a loop and measuring the time using gettimeofday() - the results are: ~220 microseconds for bsearch

Re: Issues removing files with certain characters in their names.

2014-05-30 Thread Ralf Friedl
Jason Cipriani wrote: I just want to bring to attention a potential issue, described here: http://superuser.com/questions/587778/cant-delete-file-with-foreign-letters It seems at least two users (the original poster and also this post ) were unable to remo

Re: setting a default LANG option for unicode, ash shell - patch

2014-06-12 Thread Ralf Friedl
Richard Moore wrote: I am just posting this in case it helps someone else out. I had trouble creating a small live boot system to run an ncurses program requiring unicode support, running straight from rcS. Without the LANG env set it didn't display any unicode. Exporting LANG in rcS didnt hav

Re: [PATCH 1/2] find: use sysconf(_SC_ARG_MAX) to determine the command-line size limit

2014-06-23 Thread Ralf Friedl
Bartosz Gołaszewski wrote: 2014-06-22 13:49 GMT+02:00 Denys Vlasenko : + IF_FEATURE_FIND_EXEC_PLUS(G.max_argv_len = BB_ARG_MAX;) \ The "- 2048" part should be here, not inside BB_ARG_MAX (not all users will want that subtraction). But then the user would substract these bytes even when usi

Re: ftpd authentication [PATCH] ftpd: NOMMU/chroot fix

2014-06-26 Thread Ralf Friedl
Denys Vlasenko wrote: On Thu, Jun 26, 2014 at 11:45 AM, Morten Kvistgaard wrote: I've attached my strace. I'm not sure that it tells me anything though. I've run: sudo strace -p -f -o ftpd.strace Is there a better way? Anyway, the current code will exit jail with the following code: ... if (

Re: Info for Rich Felker, as I have permanent failure to deliver mail to him

2014-07-01 Thread Ralf Friedl
Harald Becker wrote: Hi Rich, you told me dal...@libc.org had an intermediate problem, but shall work normal. Since my first question to this, I have continued trouble to send mail to your address. I always get an error reply, like this: Harald This is an error in the DNS of libc.org. As you

Re: [PATCH v2] top: fix and merge code to parse /proc/meminfo

2014-07-28 Thread Ralf Friedl
Timo Teras wrote: On Sun, 27 Jul 2014 21:50:28 +0200 Denys Vlasenko wrote: Applied, thanks! Thanks, though I noticed now a weirdness that did not happen before. +static void parse_meminfo(unsigned long meminfo[MI_MAX]) +{ ... + memset(meminfo, 0, sizeof(meminfo)); Seems to not work. Th

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Ralf Friedl
Xabier Oneca -- xOneca wrote: Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca : Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false invocation') says about false when invoked with --help: Note that `false' (unlike all other programs documente

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Ralf Friedl
Xabier Oneca -- xOneca wrote: >> And I want to add that --help will only be used ever in an interactive >> shell by a person, so the return value may be dispensable. (i.e. >> doesn't mind to the user how does --help return as soon as the help >> text is printed in screen) > > Actually this is th

Re: Reg: Busybox mount fails to mount ntfs file system

2014-09-12 Thread Ralf Friedl
Indira Valmiki wrote: I am using debian wheezy. Kernel version - 3.4.74. busybox version - 1.21.1 I am trying to mount a NTFS filesystem USB by using following command. mount -t ntfs-3g /dev/sda1 But i'm getting below error, mount: mounting /dev/sda1 on /var/local/devices/ntfs failed: No suc

Re: rm -r fails to delete entire hierarchy when path goes in and out of it

2014-09-17 Thread Ralf Friedl
Gian Ntzik wrote: It seems that using rm -r with a path that goes into the hierarchy intended for removal (and back up e.g. using dot-dots) fails to remove the entire hierarchy. For example, $ mkdir -p /tmp/a/b/c $ mkdir -p /tmp/a/e $ rm -r /tmp/a/b/../../a rm: can't remove 'a/b/../../a/e': No

Re: In regard to CVE-2014-7169 CVE-2014-6271

2014-09-27 Thread Ralf Friedl
Sean Mathews wrote: In regard to CVE-2014-7169 CVE-2014-6271 looking at busybox-1.22.1/networking/udhcp/dhcpc.c line 403 fill_envp() it seems as if it would be trivial to mess with bootfile and inject a packet that has garbage in the bootfile and exploit this vulnerability. We should keep in mi

Re: [PATCH 2/3] zcip: allow our own class B range to be used for ZeroConf

2014-10-15 Thread Ralf Friedl
Michel Stam wrote: 169.254 may already be used by a local network. This patch allows specifying your own IP range. Why would you want to use a different range? You would have to specify it to each client, which seems against the idea of ZeroConf. ___

Re: [PATCH] Config: select PLATFORM_LINUX if using sendfile()

2014-12-10 Thread Ralf Friedl
Bartosz Golaszewski wrote: Man entry for sendfile: Not specified in POSIX.1-2001, or other standards. Other UNIX systems implement sendfile() with different semantics and prototypes. It should not be used in portable programs. Select PLATFORM_LINUX if enabling FEATURE_USE_SENDFILE.

Re: why are init's arguments wiped ?

2016-02-01 Thread Ralf Friedl
Nicolas CARRIER schrieb: "/proc/1/cmdline is not a standard Unix ..." I absolutely don't know any other OS, be it Unix or not... But don't they provide a way to access the command-line used to launch a program ? In busybox's code at least, I see only one implementation of read_cmdline, which r

Re: busybox sed, 'r' command

2016-03-23 Thread Ralf Friedl
Cristian Ionescu-Idbohrn wrote: sed (GNU sed) 4.2.2 can do this: $ printf 'foo bar baz' | sed r - foo bar baz or, after storing the text in a file: $ printf 'foo bar baz' >/tmp/bar $ sed r /tmp/bar foo

Re: Parallel make bug in busybox

2016-08-13 Thread Ralf Friedl
Arnout Vandecappelle wrote: As an aside, there may be a second issue: applets/Kbuild.src specifies the same command for both include/applet_tables.h and include/NUM_APPLETS.h, but that command will always generate both files. So if the rules for the two files are launched in parallel, there is an

Re: Shell script silently exits. Why?

2016-11-18 Thread Ralf Friedl
Arnout Vandecappelle wrote: I guess you have a 'set -e' somewhere in your script? let returns the value it computed, so if $foo is different from 0, it will return non-0. This causes the shell to exit. It's POSIX behaviour. Bash "let" returns 1 if there is a sytax error within the express

Re: copying multiple files

2016-11-21 Thread Ralf Friedl
David Henderson wrote: Good afternoon. I have several files in two different directories that I'm trying to copy in a destination using: cp -f /tmp/test/{a.txt,b.txt,c.txt} /tmp/test2/{1.txt,2.txt,3.txt} /tmp/dest This keeps failing. Is this implemented in BB? In general, and here in particul

Change breaks modprobe/insmod with spaces in parameters, commit 1396221d5a741ef8e1e8abca88836b341a3cab84

2011-02-01 Thread Ralf Friedl
uotes always should also be possible. Now obviously I don't want to load iptable_filter with a space in the parameters, but it's a module that is commonly available for testing. The actual module is for a specific hardware and the vendor doesn't even provide the source to the

Re: Change breaks modprobe/insmod with spaces in parameters, commit 1396221d5a741ef8e1e8abca88836b341a3cab84

2011-02-01 Thread Ralf Friedl
Denys Vlasenko wrote: On Tuesday 01 February 2011 19:48, Ralf Friedl wrote: The commit http://git.buildroot.org/busybox/commit/?id=1396221d5a741ef8e1e8abca88836b341a3cab84 breaks modprobe/insmod with spaces inside the parameters. When calling modprobe -v iptable_filter forward=

Re: Limitations on a command line

2011-02-02 Thread Ralf Friedl
d. Filenames with spaces should work with -exec. Newer versions support "-exec cmd {} +" instead of "-exec cmd {} ;", which behaves like xargs, it will run the command with multiple filenames. Ralf Friedl ___ busybox mailing list

Re: Can I set up my own sub-environment?

2011-02-08 Thread Ralf Friedl
to do something. Try this instead: f1() { for z in $(seq 1 3); do y=$z; done } Ralf Friedl ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: Can I set up my own sub-environment?

2011-02-08 Thread Ralf Friedl
fter the keyword "function". Actually this contradicts each other, because according to the manual, "()" is required, while according to the help, it is not allowed. Ralf Friedl ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [Bug 3091] Nonportable tool usage in scripts

2011-02-09 Thread Ralf Friedl
Denys Vlasenko wrote: On Wednesday 09 February 2011 00:56, Rich Felker wrote: Oh, sorry. In scripts/mkconfigs, there are two occurrances of: grep '^#\? \?CONFIG_' "$config" \ they should read: egrep '^#? ?CONFIG_' "$config" \ I see that this '?' thing is a can of worms. I propose to

Re: file moving problems

2011-02-11 Thread Ralf Friedl
Denys Vlasenko wrote: On Thursday 10 February 2011 21:40, David Henderson wrote: I can do a "cp -dpR !(b.txt) d" within bash using the full cp command to move everything except b.txt into the d directory. This doesn't work for me even in bash: $ echo cp -dpR !(b.txt) d bash: !: event

Re: [PATCH] wget.c: comment about a compatibility issue with GNU wget

2011-02-14 Thread Ralf Friedl
gotru...@gmail.com wrote: Behavior of downloading multiple urls with bbox "wget -O" is not obvious and is a compatibility issue with original wget. >From gnu wget man page: `-O FILE' `--output-document=FILE' The documents will not be written to the appropriate files, but all will be conca

Re: complaint from svlogd

2011-02-16 Thread Ralf Friedl
David Collier wrote: I assume it would be "conceptually difficult and wrong" to issue an EOF on stdout when a process is killed by SIGKILL ? Actually it would be "conceptually impossible and wrong" to NOT issue an EOF on stdout when a process is killed by SIGKILL. How is your strace in this

Re: Fix libiproute build with kernel headers older than 2.6.17

2011-02-26 Thread Ralf Friedl
Stefan Seyfried wrote: the attached patch fixes the build if your kernel headers happen to be older than 2.6.17, which is when IFLA_OPERSTATE was introduced. Unfortunately, IFLA_OPERSTATE is not a define, so I can't check it with #ifdef. However, IFF_DORMANT is a define and was introduced with t

Re: [PATCH] tar: remove leading / and ../ on reading and writing

2011-02-28 Thread Ralf Friedl
Alexander Shishkin wrote: Currently, tar will add members with names starting with the prefixes to an archive unmodified, and will then refuse to extract from such archive. However, GNU tar will strip these prefixes upon creating the archive and reading from it. Is there a use case for this?

Re: Program segmentation fault and busybox

2011-03-17 Thread Ralf Friedl
Georgy Lukonin wrote: On my terminal I have something like that: root@system#prog Segmentation fault root@system#root@system#root@system#root@system#root@system What you need is "stty sane". Ralf ___ busybox mailing list busybox@busybox.net http:

Re: Program segmentation fault and busybox

2011-03-17 Thread Ralf Friedl
Georgy Lukonin wrote: Am Donnerstag, den 17.03.2011, 16:42 +0100 schrieb Ralf Friedl: Georgy Lukonin wrote: On my terminal I have something like that: root@system#prog Segmentation fault root@system#root@system#root@system#root@system#root@system What you need is "

Re: update a running busybox

2011-03-29 Thread Ralf Friedl
Arno Steffen wrote: How can I exchange a busybox while the system is running? I have to use some kind of update script: #!/bin/sh mount -w -o remount / ... if [ -f busybox ] ; then chmod 4755 busybox mv busybox /bin fi ... mount -r -o remount / reboot You can try ln /bin/busybo

Re: Compile error for latest snapshot(20110328)

2011-03-29 Thread Ralf Friedl
Denys Vlasenko wrote: The UBI attach/detach functionality is not available in kernels older than 2.6.25. Enabling this applet on such an old kernel doesn't make sense. Ok, that's a valid argument :-) Maybe #error'ing out with "your kernel headers are probably too old..." would be an opti

Re: update a running busybox

2011-04-05 Thread Ralf Friedl
Arno Steffen wrote: 2011/3/29 Harald Becker : You can try ln /bin/busybox /bin/busybox.old mv busybox /bin/busybox Then remove /bin/busybox.old after the next reboot. That is the best way to replace any running executable in place, but doesn't solve the "Device busy" problem in all

Re: update a running busybox

2011-04-05 Thread Ralf Friedl
Arno Steffen wrote: 2011/4/5 Ralf Friedl : Arno Steffen wrote: 2011/3/29 Harald Becker : You can try ln /bin/busybox /bin/busybox.old mv busybox /bin/busybox Then remove /bin/busybox.old after the next reboot. That is the best way to replace any running

Re: Adding ipkg to Busybox?

2011-04-08 Thread Ralf Friedl
Gilles wrote: I tried "--disable-gpgme", "--disable-gpgme-config, "--without-gpgme", and "--without-gpgme-config", to no avail. Anybody knows? Try ./configure --help If everything else fails, look at the source. Ralf ___ busybox mailing list b

Re: ls output

2011-05-12 Thread Ralf Friedl
Harald Becker wrote: To show all of the files in a single column without showing the . and .. directories, I would use 'ls -AR1', however the . and .. directories are still showing up in the listing. Looks like a bug, combining '-A' and '-R'. That would be a bug, but I can't reproduce i

Re: ls output

2011-05-12 Thread Ralf Friedl
David Henderson wrote: I'm not sure how much it would increase the size of BB, but I wouldn't think much since the 'ls' command already processes regex's. Well, where exactly does 'ls' already processes regex's? Ralf ___ busybox mailing list busybox@b

Re: ls output

2011-05-13 Thread Ralf Friedl
David Henderson wrote: On 05/12/2011 05:11 PM, Ralf Friedl wrote: David Henderson wrote: I'm not sure how much it would increase the size of BB, but I wouldn't think much since the 'ls' command already processes regex's. Well, where exactly does 'ls' alrea

Re: busybox with single applet enabled

2011-05-20 Thread Ralf Friedl
Sergey Naumov wrote: Let's imagine a typical situation: you changed some applet and now you want to test it. You call "make allnoconfig", then in menuconfig you enable desired applet, make busybox and call applet as usual: ./busybox applet parameters And... your parameters are treated differentl

Re: 'make mrproper' does not delete all generated files

2011-06-06 Thread Ralf Friedl
walter harms wrote: Am 06.06.2011 09:26, schrieb Cristian Ionescu-Idbohrn: Advertized in the Makefile: # make mrproper Delete the current configuration, and all generated files Still: include/applets.h:/* DO NOT EDIT. This file is generated from applets.src.h */ include/usage.h:/* DO NOT

Re: Significant performance problem with modprobe

2011-06-14 Thread Ralf Friedl
Ed W wrote: On 14/06/2011 11:31, Lauri Kasanen wrote: While fixing this issue wouldn't make a huge difference in my case, it would seem to have a measurable effect nonetheless. I guess for the big effect I should wait for the mentioned module loader work. A quick way to benchmark the d

Re: Significant performance problem with modprobe

2011-06-14 Thread Ralf Friedl
Ed W wrote: On 14/06/2011 13:19, Ralf Friedl wrote: You wrote earlier that your modules.alias is 137KB. How many modules do you have in that file? I have just 34kB for a full PC Linux. Hmm, curious. I only have a couple of modules, basically wireless drivers and serial to usb drivers

Re: [1.16.2] "reboot" -> "No such file or directory"?

2011-07-01 Thread Ralf Friedl
Ed W wrote: On 30/06/2011 16:19, Gilles wrote: However when I run /bin/reboot, I get this: root:/bin> ./reboot reboot: No such file or directory I might be on the wrong track, but just a heads up: You get this error message when you run some script wh

Re: [PATCH] ash: add support for history buffer

2011-07-14 Thread Ralf Friedl
Dennis Groenen wrote: Ash writes to ~/.ash_history after every command, causing excessive wear on devices which use a flash-based device as their storage medium (i.e. one erase block cycle per command). This patch allows you to set a temporary location where ash's history will be saved until the

[PATCH] df option -P

2011-07-19 Thread Ralf Friedl
Hi In coreutils df, one of the effects of the option -P is to output everything in one line. This makes it much easier for a script to parse the output of df. This patch adds the same behavior to busybox df. Ralf diff --git a/coreutils/df.c b/coreutils/df.c index 846cb38..63dbd61 100644 ---

Re: [PATCH] users: new applet

2011-07-27 Thread Ralf Friedl
gotru...@gmail.com wrote: On Wed, Jul 27, 2011 at 11:29 AM, Matthias Andree wrote: Re printf, adding a format string ("%s") is absolutely necessary. Else use fputs(ut->ut_user, stdout) It was about saving bytes but ok, revised patch attached. You can probably get those bytes back by us

Re: [PATCH] improve checks on usernames V3.

2011-08-02 Thread Ralf Friedl
Tito wrote: Hi, minor improvements vs. v2 patch: 1) some more comments added. 2) we now print the position of the illegal character. ... /* We don't use isalnum as it will allow locale-specific non-ASCII */ /* letters in legacy 8-bit locales. * What is the prob

Re: [PATCH] improve checks on usernames V3.

2011-08-03 Thread Ralf Friedl
Harald Becker wrote: On 02.08.2011 22:16, Ralf Friedl wrote: What is the problem with locale-specific characters? Portability is the problem. Especially if tar files of such users and untar it on other systems those "none-portable" user names may produce trouble. Sometim

Re: [PATCH] improve checks on usernames V3.

2011-08-04 Thread Ralf Friedl
Harald Becker wrote: Tar never creates user when extracting. It should just treat whatever comes as a string and pass it to getpwnam, which should also not care and use something like strcmp. I would just call that tar program broken. Call them broken, but still such implementations exist

Re: [PATCH] ifupdown: support post-up / pre-down hooks

2011-10-06 Thread Ralf Friedl
Peter Korsgaard wrote: diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 3820330..abc6b58 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -891,6 +891,8 @@ static struct interfaces_file_t *read_interfaces(const char *filename) if (s

Help text for pivot_root

2011-11-06 Thread Ralf Friedl
Could you add something like this to the help text for pivot_root? It would have saved me quite some time when I removed pivot_root from a 2.6 system that needed it. Ralf Signed-off-by: Ralf Friedl diff --git a/util-linux/Config.src b/util-linux/Config.src index 888bc8f..66ee614 100644 --- a

Re: Amusing article about busybox

2012-02-11 Thread Ralf Friedl
Felipe Contreras wrote: On Sat, Feb 11, 2012 at 8:19 PM, Bradley M. Kuhn wrote: Felipe Contreras wrote at 15:16 (EST) yesterday: Enforcement only ensures that we would get the bare minimum (legal) from the company, and IMO that doesn't help much. OpenWRT and SamyGo are tw

Re: Amusing article about busybox

2012-02-15 Thread Ralf Friedl
Felipe Contreras wrote: On Sun, Feb 12, 2012 at 4:47 AM, Ralf Friedl wrote: Felipe Contreras wrote: True, there are exceptions. There are more exceptions. You seem to imply that without enforcement of the GPL, there would magically appear more companies who want to contribute

Re: Amusing article about busybox

2012-02-28 Thread Ralf Friedl
Felipe Contreras wrote: On Wed, Feb 15, 2012 at 5:46 PM, Ralf Friedl wrote: Let's get some facts straight. Sony wants to avoid the GPL busybox not because of busybox itself, but because they fear that they can be forced to comply with the GPL on Linux, and they want to avoid that. They

Re: [Patch] fix unsigned long fast_strtoul_10(char **endptr) for Linux 2.4

2012-02-28 Thread Ralf Friedl
walter harms wrote: Enabling the fast proc scan code for linux2.4 causes top to display strange numbers [see:possible bug in proc fast scan code] the reason for this is that the last char in proc/$$/stat is "\n". This is no problem for > 2.4 since the stats line contains additional chars. Pleas

Re: BusyBox ash as subshell for mc (midnight commander)?

2012-03-01 Thread Ralf Friedl
ra...@gmx.de schrieb: http://freetz.org Are you going to add mc to freetz? ... wow ... that may swap some of my priorities. Mc has been in Freetz for a long time (at least five years). ___ busybox mailing list busybox@busybox.net http://lists.bus

Re: Compiling Busybox for gcov coverage testing

2012-03-08 Thread Ralf Friedl
Jiaqi Tan wrote: Hi, I'm sorry if this has been asked before, but has anyone tried compiling Busybox on x86 for gcov coverage testing before? I tried using CFLAGS="-fprofile-arcs -ftest-coverage" but the compilation failed with the following errors: HOSTLD scripts/kconfig/conf scripts/kconfi

Re: [ra...@gmx.de: computer phenomena: output of tty applet]

2012-04-02 Thread Ralf Friedl
ra...@gmx.de wrote: I think reading /proc/self/fd/1 (we want to test stdout, not stdin or stderr) is the right thing to do for the "tty" command, As far as I know is tty specified to test the stdin so fd 0 is the right one (fd 2 was a typo of mine, sorry). Currently Busybox and GNU tty tes

Re: `netstat -ntp` odd 'Program name' presentation

2012-04-22 Thread Ralf Friedl
Cristian Ionescu-Idbohrn wrote: The 'Program name' part is fetched from /proc//cmdline, then mangled before presentation. Mangling is done in netstat.c, function 'dir_act'. The function assumes cmdline is a file path and extracts the basename. Obviously that assumption is not always correct. It

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Ralf Friedl
What you are looking for is sometimes called "union file system". There exist some variations of such file systems, unfortunately there is none in the official kernel. It seems that Linus doesn't like the idea. Of course this is not related to busybox. You may want to look at the implementation

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Eial Czerwacki wrote: system 1: nslookup skynet Server: 10.200.10.20 Address:10.200.10.20#53 Name: skynet Address: 10.200.10.20 system 2: nslookup skynet Server:10.200.10.20 Address 1: 10.200.10.20 skynet Name: skynet Address 1: 10.200.10.20 skynet both use the s

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Eial Czerwacki wrote: On 07/08/2012 01:27 PM, Ralf Friedl wrote: Looking at the source busybox-1.19.2/networking/nslookup.c it's simply not possible that the output of system 1 comes from busybox 1.19.2. but still I do see two distinct outputs on the same busybox. Please verify

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Harald Becker wrote: By the way, the applet nslookup is misleading, because it uses getaddrinfo instead of a DNS query. As a consequence, there are even answers from non existing DNS-servers. Whops ... so Busybox nslookup does the job of 'getent hosts' (or one of its alikes) ... and not a

Re: [PATCH] new applet gethostbyname

2012-07-08 Thread Ralf Friedl
Eial Czerwacki wrote: On 07/08/2012 01:57 PM, Ralf Friedl wrote: Eial Czerwacki wrote: On 07/08/2012 01:27 PM, Ralf Friedl wrote: Looking at the source busybox-1.19.2/networking/nslookup.c it's simply not possible that the output of system 1 comes from busybox 1

Re: Copyright message for 1.20.2?

2012-07-13 Thread Ralf Friedl
ra...@gmx.de wrote: IMO it may be a personal decision on many different aspects if we include a lengthy copyright notice within the binary or not. We can have a configuration option to select between a full list of all copyright holders (automatically generated from special "/* Copyright:" header

Re: [PATCH] refactor correct_password.c to avoid one #if

2012-08-01 Thread Ralf Friedl
Tito wrote: On Tuesday 31 July 2012 18:08:15 walter harms wrote: @@ -55,7 +49,10 @@ int FAST_FUNC correct_password(const struct passwd *pw) } correct = pw->pw_passwd; #if ENABLE_FEATURE_SHADOWPASSWDS + /* Using _r function to avoid pulling in static buffers */ i

busybox@busybox.net

2012-09-02 Thread Ralf Friedl
Rich Felker wrote: On Sun, Sep 02, 2012 at 11:35:04PM +0200, Yann E. MORIN wrote: On Sunday 02 September 2012 23:21:36 Rich Felker wrote: It seems busybox ash is misinterpreting "&>" as having some special meaning rather than being a "&" token followed by a ">" token. Okay. The

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Arnaud Rébillout wrote: Also, any SMTP server I've ever used accepts NL-only (with no CR) input, so for interactive use rather than script use (wherein the latter you would want to be fully robust against strict servers), it probably doesn't matter anyway... I'm experimenting with a gmail server

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Denys Vlasenko wrote: Changed it to this in git: else if (c == '\r') - outbuf[j++] = '\0'; /* CR -> CR NUL */ + /* See RFC 1123 3.3.1 Telnet End-of-Line Convention. +* Using CR LF instead of other allowed possibi

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Denys Vlasenko wrote: On Thu, Sep 13, 2012 at 2:55 PM, Ralf Friedl wrote: Denys Vlasenko wrote: Changed it to this in git: else if (c == '\r') - outbuf[j++] = '\0'; /* CR -> CR NUL */ + /* See RFC 1

Re: [git commit] hostid: do not output sign-extended host id. Closes 6056

2013-03-15 Thread Ralf Friedl
Denys Vlasenko wrote: On Wednesday 06 March 2013 08:27, Thierry Reding wrote: On Mon, Mar 04, 2013 at 03:04:38AM +0100, Denys Vlasenko wrote: commit: http://git.busybox.net/busybox/commit/?id=9bbf6b98c42a212b8a4b1aa02975ac18bb612922 branch: http://git.busybox.net/busybox/commit/?id=ref

Re: ash: "source " makes ash exit?

2013-03-18 Thread Ralf Friedl
Cathey, Jim wrote: So if I should type, manually, ". oopsImisspelledIt" my session is supposed to go away? No, only an non-interactive shell is supposed to exit. ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/

Re: CTRL-ALT-DEL not working as expected. Seeking for advices

2013-03-30 Thread Ralf Friedl
Laurent Bercot wrote: kernel (hd0,0)/vmlinuz-... root=/dev/sda2 init=/root/a.out Depending on your kernel, it may be a little more complicated than that. If your kernel has been compiled with an initramfs, the first userland process won't be /root/a.out, but the /init file in the initramfs

Re: [PATCH] sulogin: allow system maintenance login if root password is empty

2013-05-20 Thread Ralf Friedl
Jonathan Liu wrote: The current password checking is unable to distinguish between the user entering an empty password or pressing Control-D. As a result, an empty password always results in normal startup. We modify bb_ask to store the EOF status after the null terminator if the password is emp

Re: Cross-compilation

2013-06-04 Thread Ralf Friedl
Laurent Bercot wrote: Autotools-based can be good or bad for cross-compiling. The biggest issue is that lots of people write broken tests that need to run test programs to get the results they want. As long as there are differences between systems, build-time tests will be necessary to check f

Re: [PATCH] ubimkvol: add -m option to create volume of maximum size

2013-06-04 Thread Ralf Friedl
walter harms schrieb: Am 03.06.2013 20:45, schrieb Paul B. Henson: On 6/3/2013 3:48 AM, walter harms wrote: +p = path + sprintf(path, "/sys/class/ubi/ubi%d/", num); + +strcpy(p, "avail_eraseblocks"); you can use xasprintf() here ? I dunno, Mike said to use sprintf/st

  1   2   3   >