oweals/busybox.git
15 years agohush: add support for special vars in braces
Mike Frysinger [Mon, 1 Jun 2009 18:09:09 +0000 (14:09 -0400)]
hush: add support for special vars in braces

Some people like to use ${?} rather than $?, so make sure we support all
the special single char vars that use this form.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush_test: filter test output to avoid C lib differences
Mike Frysinger [Mon, 1 Jun 2009 18:08:09 +0000 (14:08 -0400)]
hush_test: filter test output to avoid C lib differences

The getopt function in some C libraries wraps the option in single quotes
while others do not.  Avoid the issue by running sed on the output and
strip all quotes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolineedit: fix warning about unused label when VI editing is disabled
Mike Frysinger [Mon, 1 Jun 2009 18:02:49 +0000 (14:02 -0400)]
lineedit: fix warning about unused label when VI editing is disabled

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agonc, hush: cosmetic cleanups, no code changes
Denys Vlasenko [Mon, 1 Jun 2009 09:26:30 +0000 (11:26 +0200)]
nc, hush: cosmetic cleanups, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoread_key: drop optimization where we read 3 bytes at once
Denys Vlasenko [Fri, 29 May 2009 08:39:06 +0000 (10:39 +0200)]
read_key: drop optimization where we read 3 bytes at once

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohust: trivial simplification in builtin_type
Denys Vlasenko [Thu, 28 May 2009 15:07:22 +0000 (17:07 +0200)]
hust: trivial simplification in builtin_type

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix bug 353 (wrong handling of \x in assignments)
Denys Vlasenko [Thu, 28 May 2009 14:49:11 +0000 (16:49 +0200)]
hush: fix bug 353 (wrong handling of \x in assignments)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: optimize type builtin a bit more
Denys Vlasenko [Thu, 28 May 2009 07:58:43 +0000 (09:58 +0200)]
hush: optimize type builtin a bit more

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: optimize type builtin a bit
Denys Vlasenko [Thu, 28 May 2009 07:45:50 +0000 (09:45 +0200)]
hush: optimize type builtin a bit

function                                             old     new   delta
builtin_type                                         130     125      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoonly build common libarchive objs when needed
Mike Frysinger [Thu, 28 May 2009 04:47:14 +0000 (00:47 -0400)]
only build common libarchive objs when needed

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agomodprobe: fix more bugs in modprobe -r
Denys Vlasenko [Thu, 28 May 2009 01:54:29 +0000 (03:54 +0200)]
modprobe: fix more bugs in modprobe -r

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agocpio.tests: fix false positive
Denys Vlasenko [Thu, 28 May 2009 00:03:29 +0000 (02:03 +0200)]
cpio.tests: fix false positive

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: implement `type`
Mike Frysinger [Wed, 27 May 2009 21:06:25 +0000 (17:06 -0400)]
hush: implement `type`

Implement support for the POSIX `type` command.  Only POSIX stuff is
supported here, no bash extensions like -p or -P.

In the process, split the $PATH searching code out of builtin_source() and
into its own find_in_path() function so we don't duplicate it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush: remove outdated TODO and superfluous macro; fix compile breakage
Denys Vlasenko [Wed, 27 May 2009 12:39:35 +0000 (14:39 +0200)]
hush: remove outdated TODO and superfluous macro; fix compile breakage

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoPOSIX conformance documentation for busybox
David Krakov [Tue, 26 May 2009 23:42:34 +0000 (19:42 -0400)]
POSIX conformance documentation for busybox

Attached a start for POSIX conformance documentation for busybox (see
TODO file and discussion last week).
A table of all options as defined by POSIX and as implemented by
busybox (see for a FreeBSD example
http://people.freebsd.org/~schweikh/posix-utilities.html).

Only the tools that are stand-alone applets are documented (not ash
built-ins as 'read'), as there are multiple shells.
When there are two versions (echo) the stand-alone version was
checked. I think this may be the wrong way to go, as most users will
probably use the built-in version - but which shell?

The table was auto-generated by running, for each POSIX utility,
latest git allyesconfig* "busybox <tool> --help" and parsing the
output, and comparing that to tool options extracted from its man page
at http://www.opengroup.org/onlinepubs/9699919799/.
This means that it the usage string is not correct, the table is also
wrong. I noticed that for 'kill', for example, the usage string does
not mention the -s, -q, -o options.
For each option is set whether it exists in busybox and if it is, is
it compliant to the standard. Of course, checking compliance can only
be done manually - a process which will probably take some time (see
'cat' for example).

I didn't post the auto-generation script (python, ugly) because the
table will now change manually; I can post it if there is anyone
interested.

As for the tools not implemented by busybox at all, I think most of
them are indeed fairly esotetic. Some I was suprised to see missing
are link, file, newgrp, unlink.

* Well, almost allyesconfig - but nothing very POSIX-y was disabled.

Signed-off-by: David Krakov <krakov@gmail.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush: tweak comment
Denys Vlasenko [Tue, 26 May 2009 12:39:41 +0000 (14:39 +0200)]
hush: tweak comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: rename last_waitpid_was_0 to we_have_children
Denys Vlasenko [Tue, 26 May 2009 12:34:10 +0000 (14:34 +0200)]
hush: rename last_waitpid_was_0 to we_have_children

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agomodprobe: fix modprobe -r. closes bug 315
Denys Vlasenko [Tue, 26 May 2009 10:48:34 +0000 (12:48 +0200)]
modprobe: fix modprobe -r. closes bug 315

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix SIGCHLD counting code, but keep it disabled for now.
Denys Vlasenko [Mon, 25 May 2009 14:38:32 +0000 (16:38 +0200)]
hush: fix SIGCHLD counting code, but keep it disabled for now.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoflash_lock, flash_unlock: new applets
Denys Vlasenko [Mon, 25 May 2009 02:15:37 +0000 (04:15 +0200)]
flash_lock, flash_unlock: new applets

By Thierry Reding (thierry.reding AT avionic-design.de)

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agomake compound.tests executable
Denys Vlasenko [Sat, 23 May 2009 15:00:13 +0000 (17:00 +0200)]
make compound.tests executable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix problems with case in subshells and with "case esac"
Denys Vlasenko [Sat, 23 May 2009 14:50:07 +0000 (16:50 +0200)]
hush: fix problems with case in subshells and with "case esac"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush_test: add some pathological compound list tests
Mike Frysinger [Thu, 21 May 2009 22:35:37 +0000 (18:35 -0400)]
hush_test: add some pathological compound list tests

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush_test: test for subshell function syntax
Mike Frysinger [Thu, 21 May 2009 22:24:21 +0000 (18:24 -0400)]
hush_test: test for subshell function syntax

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush_test: add subshelled case tests
Mike Frysinger [Thu, 21 May 2009 22:09:24 +0000 (18:09 -0400)]
hush_test: add subshelled case tests

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush_test: update test output to match new getopt() output
Mike Frysinger [Thu, 21 May 2009 21:58:15 +0000 (17:58 -0400)]
hush_test: update test output to match new getopt() output

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush_test: ignore generated files
Mike Frysinger [Thu, 21 May 2009 21:45:26 +0000 (17:45 -0400)]
hush_test: ignore generated files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohdparm: fix a thinko in a previous commit
Denys Vlasenko [Wed, 20 May 2009 21:21:42 +0000 (23:21 +0200)]
hdparm: fix a thinko in a previous commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoMerge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox
Denys Vlasenko [Wed, 20 May 2009 19:50:29 +0000 (21:50 +0200)]
Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox

15 years agohdparm: code shrink
Denys Vlasenko [Wed, 20 May 2009 14:11:41 +0000 (16:11 +0200)]
hdparm: code shrink

function                                             old     new   delta
parse_opts_0_INTMAX                                    -      12     +12
parse_opts_0_1                                         -      12     +12
parse_opts_0_max                                       -       9      +9
parse_opts                                            44      36      -8
process_dev                                         4679    4578    -101
hdparm_main                                         1061     854    -207
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 0/3 up/down: 33/-316)          Total: -283 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohdparm: correct (t & 1) ? '0' : '5' thinko; wrap 80+ col lines
Denys Vlasenko [Wed, 20 May 2009 12:48:03 +0000 (14:48 +0200)]
hdparm: correct (t & 1) ? '0' : '5' thinko; wrap 80+ col lines

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoMerge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox
Denys Vlasenko [Wed, 20 May 2009 12:10:50 +0000 (14:10 +0200)]
Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox

15 years agoMerge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox
Denys Vlasenko [Wed, 20 May 2009 10:20:48 +0000 (12:20 +0200)]
Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox

15 years agohush: fix build failure when jobs are disabled
Mike Frysinger [Wed, 20 May 2009 08:48:06 +0000 (04:48 -0400)]
hush: fix build failure when jobs are disabled

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reported-by: Thomas Chou <thomas@wytron.com.tw>
15 years agoappletlib.c: prevent applet list overflowing screen
Denys Vlasenko [Tue, 19 May 2009 16:01:42 +0000 (18:01 +0200)]
appletlib.c: prevent applet list overflowing screen

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoscriptreplay: new applet. +423 bytes
Denys Vlasenko [Tue, 19 May 2009 15:36:16 +0000 (17:36 +0200)]
scriptreplay: new applet. +423 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoadd platform tweaks
Denys Vlasenko [Tue, 19 May 2009 11:18:45 +0000 (13:18 +0200)]
add platform tweaks

login: consider platforms having no domainname field in the utsname struct
include/platform.h: define IUCLC to 0 on platforms where it is not defined

Signed-off-by: Luca Favatella <slackydeb@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoawk: put at least one NUL between $n. Hopefully closes 337.
Denys Vlasenko [Mon, 18 May 2009 21:50:03 +0000 (23:50 +0200)]
awk: put at least one NUL between $n. Hopefully closes 337.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agogzip: fix gzip with many files corrupting some files after first
Denys Vlasenko [Mon, 18 May 2009 11:08:57 +0000 (13:08 +0200)]
gzip: fix gzip with many files corrupting some files after first

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agodepmod: fix handling of .gz modules
Denys Vlasenko [Mon, 18 May 2009 11:08:04 +0000 (13:08 +0200)]
depmod: fix handling of .gz modules

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolineedit: small fixes
Denys Vlasenko [Sun, 17 May 2009 17:28:14 +0000 (19:28 +0200)]
lineedit: small fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoline editing: add an option to emit ESC [ 6 n and use results
Denys Vlasenko [Sun, 17 May 2009 14:44:54 +0000 (16:44 +0200)]
line editing: add an option to emit ESC [ 6 n and use results

This makes line editing able to recognize case when
cursor was not at the beginning of the line. It may also
be adapted later to find out display size (serial line users
would love it).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoxmalloc_[open_]read[_close]: do not ignore xrealloc return value
Denys Vlasenko [Fri, 15 May 2009 21:23:23 +0000 (23:23 +0200)]
xmalloc_[open_]read[_close]: do not ignore xrealloc return value

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolineedit: use read_key to recognize ESC sequence.
Denys Vlasenko [Fri, 15 May 2009 01:27:53 +0000 (03:27 +0200)]
lineedit: use read_key to recognize ESC sequence.

This fixes several vi mode bugs and prepares for further fixes.

function                                             old     new   delta
read_line_input                                     3287    5511   +2224
remember_in_history                                    -     499    +499
lineedit_read_key                                      -      70     +70
read_key                                             321     332     +11
input_tab                                           2823       -   -2823
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/0 up/down: 2804/-2823)        Total: -19 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoadduser/addgroup: make system id range configurable.
Denys Vlasenko [Wed, 13 May 2009 22:23:34 +0000 (00:23 +0200)]
adduser/addgroup: make system id range configurable.

By Tito (farmatito AT tiscali.it).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agomount: save 80 bytes by forced de-inlining
Denys Vlasenko [Wed, 13 May 2009 21:48:59 +0000 (23:48 +0200)]
mount: save 80 bytes by forced de-inlining

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agomount: document when kernel started accepting string as NFS options
Denys Vlasenko [Wed, 13 May 2009 14:32:32 +0000 (16:32 +0200)]
mount: document when kernel started accepting string as NFS options

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agosplit website off into dedicated git repo
Mike Frysinger [Wed, 13 May 2009 05:48:00 +0000 (01:48 -0400)]
split website off into dedicated git repo

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoTODO: add some
Denys Vlasenko [Wed, 13 May 2009 00:18:43 +0000 (02:18 +0200)]
TODO: add some

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoAdjust names, link contributing info in main index
Bernhard Reutner-Fischer [Mon, 11 May 2009 20:51:49 +0000 (22:51 +0200)]
Adjust names, link contributing info in main index

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agosysctl: stop abusing parser->line
Denys Vlasenko [Sun, 10 May 2009 21:41:29 +0000 (23:41 +0200)]
sysctl: stop abusing parser->line

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agotftp: do not risk invoking Sorcerer's Apprentice syndrome
Denys Vlasenko [Sun, 10 May 2009 21:27:43 +0000 (23:27 +0200)]
tftp: do not risk invoking Sorcerer's Apprentice syndrome

examples/udhcp/simple.script: fix incorrect test for $1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agotest commit
Bernhard Reutner-Fischer [Fri, 8 May 2009 16:22:52 +0000 (18:22 +0200)]
test commit

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agoRevert "test commit"
Bernhard Reutner-Fischer [Fri, 8 May 2009 16:19:58 +0000 (18:19 +0200)]
Revert "test commit"

This reverts commit 8606aba04b9f6b82820e739f9781dfc85ae4853a.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agotest commit
Bernhard Reutner-Fischer [Fri, 8 May 2009 16:18:42 +0000 (18:18 +0200)]
test commit

15 years agoLICENSE: update address of the FSF
Mike Frysinger [Wed, 6 May 2009 09:28:53 +0000 (05:28 -0400)]
LICENSE: update address of the FSF

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agomodprobe: add comment about expected modules.dep format
Mike Frysinger [Wed, 6 May 2009 09:24:41 +0000 (05:24 -0400)]
modprobe: add comment about expected modules.dep format

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agodepmod.pl: updates and fixes galore
Mike Frysinger [Wed, 6 May 2009 00:14:12 +0000 (20:14 -0400)]
depmod.pl: updates and fixes galore

The helper script needs updating to match latest busybox modprobe behavior
in that all dependencies need to be listed, not just the immediate ones.
Along the way, fix symbol prefixed ports, optimize the output, and add
some more depmod compatible options.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agomodprobe: add more useful debug points
Mike Frysinger [Wed, 6 May 2009 00:13:45 +0000 (20:13 -0400)]
modprobe: add more useful debug points

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd .gitignore files
Mike Frysinger [Tue, 5 May 2009 13:05:30 +0000 (09:05 -0400)]
add .gitignore files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agolibunarchive: fix build failure with !FEATURE_TAR_UNAME_GNAME
Mike Frysinger [Tue, 5 May 2009 11:00:27 +0000 (07:00 -0400)]
libunarchive: fix build failure with !FEATURE_TAR_UNAME_GNAME

We can't use C if(...) with ENABLE_FEATURE_TAR_UNAME_GNAME because it
relies on conditional members in the file_header_t structure:

archival/libunarchive/data_extract_all.c: In function â€˜data_extract_all’:
archival/libunarchive/data_extract_all.c:123: error: â€˜file_header_t’ has no member named â€˜uname’
archival/libunarchive/data_extract_all.c:124: error: â€˜file_header_t’ has no member named â€˜uname’
archival/libunarchive/data_extract_all.c:127: error: â€˜file_header_t’ has no member named â€˜gname’
archival/libunarchive/data_extract_all.c:128: error: â€˜file_header_t’ has no member named â€˜gname’
make[1]: *** [archival/libunarchive/data_extract_all.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agomdev: revert last wrong commit
Denys Vlasenko [Mon, 4 May 2009 19:59:05 +0000 (21:59 +0200)]
mdev: revert last wrong commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: small fix for unset -f on NOMMU.
root [Mon, 4 May 2009 10:00:19 +0000 (12:00 +0200)]
hush: small fix for unset -f on NOMMU.

Signed-off-by: root <root@localhost.localdomain>
15 years agofix debug message
Bernhard Reutner-Fischer [Sun, 3 May 2009 16:53:22 +0000 (18:53 +0200)]
fix debug message

  Print the mime-type only after it has been set.
  Add possible TODOs: use TCP_CORK, parse_config()

15 years agohush: add more complex case to leak testcase, fix found breakage
Denys Vlasenko [Sun, 3 May 2009 23:58:10 +0000 (01:58 +0200)]
hush: add more complex case to leak testcase, fix found breakage

function                                             old     new   delta
unset_local_var_len                                    -     167    +167
run_list                                            2350    2457    +107
set_vars_and_save_old                                  -      87     +87
free_pipe                                            207     227     +20
builtin_unset                                        220     229      +9
builtin_exit                                          49      47      -2
free_strings_and_unset                                53       -     -53
set_vars_all_and_save_old                             87       -     -87
unset_local_var                                      168       -    -168
------------------------------------------------------------------------------
(add/remove: 2/3 grow/shrink: 3/1 up/down: 390/-310)           Total: 80 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix bug where in "var=val func" var's value is not visible in func
Denys Vlasenko [Sun, 3 May 2009 22:14:30 +0000 (00:14 +0200)]
hush: fix bug where in "var=val func" var's value is not visible in func

function                                             old     new   delta
unset_local_var                                        -     168    +168
set_vars_all_and_save_old                              -      87     +87
get_ptr_to_local_var                                   -      77     +77
free_strings_and_unset                                 -      53     +53
builtin_export                                       266     274      +8
get_local_var_value                                   31      33      +2
putenv_all                                            27       -     -27
free_strings_and_unsetenv                             53       -     -53
get_local_var                                         68       -     -68
run_list                                            2475    2350    -125
builtin_unset                                        380     220    -160
------------------------------------------------------------------------------
(add/remove: 4/3 grow/shrink: 2/2 up/down: 395/-433)          Total: -38 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix \<newline> handling
Denys Vlasenko [Sun, 3 May 2009 00:15:18 +0000 (02:15 +0200)]
hush: fix \<newline> handling

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix handling of unterminated subshell: (<eof>. Fixes bug 229.
Denys Vlasenko [Sat, 2 May 2009 15:18:34 +0000 (17:18 +0200)]
hush: fix handling of unterminated subshell: (<eof>. Fixes bug 229.

function                                             old     new   delta
syntax_error_unexpected_ch                            31      41     +10
parse_stream                                        2184    2191      +7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agomdev: do not exit if user:group parse failed. closes bug 309.
Denys Vlasenko [Sat, 2 May 2009 14:33:10 +0000 (16:33 +0200)]
mdev: do not exit if user:group parse failed. closes bug 309.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix multiple redirections of the same fd (bug 227)
Denys Vlasenko [Sat, 2 May 2009 12:17:31 +0000 (14:17 +0200)]
hush: fix multiple redirections of the same fd (bug 227)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: make . cmd search $PATH
Denys Vlasenko [Sat, 2 May 2009 00:34:19 +0000 (02:34 +0200)]
hush: make . cmd search $PATH

function         old     new   delta
builtin_source   128     249    +121

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohttpd: speed up httpd.conf at the cost of 49 bytes of code
Denys Vlasenko [Fri, 1 May 2009 22:50:38 +0000 (00:50 +0200)]
httpd: speed up httpd.conf at the cost of 49 bytes of code

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoifplugd: fix warnings
Denys Vlasenko [Fri, 1 May 2009 07:04:25 +0000 (09:04 +0200)]
ifplugd: fix warnings

15 years agodes encrypt: fix goof with NUL byte added at the end as '.'
Denys Vlasenko [Fri, 1 May 2009 01:41:25 +0000 (03:41 +0200)]
des encrypt: fix goof with NUL byte added at the end as '.'

15 years agomdev: fix a case where we mangle device_path string and then use it.
Denys Vlasenko [Fri, 1 May 2009 01:09:54 +0000 (03:09 +0200)]
mdev: fix a case where we mangle device_path string and then use it.

15 years agoMake it clearer that usually people should _NOT_
Denys Vlasenko [Fri, 1 May 2009 01:00:04 +0000 (03:00 +0200)]
Make it clearer that usually people should _NOT_
select FEATURE_UNIX_LOCAL.

15 years agogit commit test
Denys Vlasenko [Thu, 30 Apr 2009 19:24:24 +0000 (21:24 +0200)]
git commit test

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years ago*: bb_error_msg's messages should not be capitalized
Denis Vlasenko [Wed, 29 Apr 2009 12:02:57 +0000 (12:02 -0000)]
*: bb_error_msg's messages should not be capitalized

15 years agolzop: new applet. Busyboxed by Alain Knaff. +7700 bytes.
Denis Vlasenko [Wed, 29 Apr 2009 12:01:51 +0000 (12:01 -0000)]
lzop: new applet. Busyboxed by Alain Knaff. +7700 bytes.

15 years agohush: make it possible to have interactive shell on non-ctty.
Denis Vlasenko [Mon, 27 Apr 2009 23:29:14 +0000 (23:29 -0000)]
hush: make it possible to have interactive shell on non-ctty.
 init=/bin/hush: shows prompt, history works, etc.

function                                             old     new   delta
hush_main                                            888     925     +37
block_signals                                        139     152     +13
builtin_fg_bg                                        284     293      +9
checkjobs_and_fg_shell                                35      41      +6
sigexit                                               65      66      +1
reset_traps_to_defaults                              165     164      -1
parse_stream                                        2200    2184     -16
run_list                                            2502    2475     -27
getpgid                                               35       -     -35
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 5/3 up/down: 66/-79)            Total: -13 bytes

15 years agomake leak test more robust by unsetting all vars
Denis Vlasenko [Sun, 26 Apr 2009 23:25:36 +0000 (23:25 -0000)]
make leak test more robust by unsetting all vars

15 years agohush: make getopt32 usable in builtins. use it in unset.
Denis Vlasenko [Sun, 26 Apr 2009 23:22:40 +0000 (23:22 -0000)]
hush: make getopt32 usable in builtins. use it in unset.
 more uses are expected in the future.

function                                             old     new   delta
getopt32                                            1356    1393     +37
builtin_export                                       256     266     +10
builtin_unset                                        418     380     -38

15 years agohush: nommu fix for function passing
Denis Vlasenko [Sun, 26 Apr 2009 20:06:14 +0000 (20:06 -0000)]
hush: nommu fix for function passing

15 years agohush: fix SEGV in % expansion
Denis Vlasenko [Sun, 26 Apr 2009 11:25:19 +0000 (11:25 -0000)]
hush: fix SEGV in % expansion

function                                             old     new   delta
expand_variables                                    2203    2217     +14

15 years agoifplugd: tiny shrink
Denis Vlasenko [Sun, 26 Apr 2009 01:43:36 +0000 (01:43 -0000)]
ifplugd: tiny shrink

15 years agoifplugd: add copyright
Denis Vlasenko [Sun, 26 Apr 2009 01:17:44 +0000 (01:17 -0000)]
ifplugd: add copyright

15 years agoifplugd: new applet by Maksym Kryzhanovskyy (xmaks AT email.cz)
Denis Vlasenko [Sun, 26 Apr 2009 01:08:51 +0000 (01:08 -0000)]
ifplugd: new applet by Maksym Kryzhanovskyy (xmaks AT email.cz)
 +3k code and 0.5k in messages. Most of the bloat due to compat :(

15 years agoshrink if FEATURE_SHADOWPASSWDS is off
Denis Vlasenko [Sat, 25 Apr 2009 13:26:10 +0000 (13:26 -0000)]
shrink if FEATURE_SHADOWPASSWDS is off

15 years agoadd FEATURE_UNIX_LOCAL. By Ingo van Lil (inguin AT gmx.de)
Denis Vlasenko [Sat, 25 Apr 2009 13:16:53 +0000 (13:16 -0000)]
add FEATURE_UNIX_LOCAL. By Ingo van Lil (inguin AT gmx.de)

15 years agounlzma: speedup, by Pascal Bellard (pascal.bellard AT ads-lu.com)
Denis Vlasenko [Sat, 25 Apr 2009 12:19:35 +0000 (12:19 -0000)]
unlzma: speedup, by Pascal Bellard (pascal.bellard AT ads-lu.com)

LZMA_FAST off: 10% faster and:
function                                             old     new   delta
rc_is_bit_1                                            -      92     +92
rc_do_normalize                                       45      81     +36
rc_update_bit_1                                       25       -     -25
rc_update_bit_0                                       30       -     -30
rc_is_bit_0_helper                                    38       -     -38
rc_get_bit                                            60      17     -43
rc_read                                               48       -     -48
unpack_lzma_stream                                  1768    1517    -251
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 1/2 up/down: 128/-435)         Total: -307 bytes

LZMA_FAST on: 14% faster and:
unpack_lzma_stream                                  2301    2737    +436
rc_get_bit                                           106       -    -106

15 years agowe need to daemonize *before* opening the watchdog device
Mike Frysinger [Sat, 25 Apr 2009 06:16:37 +0000 (06:16 -0000)]
we need to daemonize *before* opening the watchdog device

15 years agodo not tell people they can enter "help" if help has actually been disabled
Mike Frysinger [Fri, 24 Apr 2009 06:40:30 +0000 (06:40 -0000)]
do not tell people they can enter "help" if help has actually been disabled

15 years agouse get_local_var_value() rather than getenv() when working with PS1/PS2/HOME, respec...
Mike Frysinger [Fri, 24 Apr 2009 06:26:18 +0000 (06:26 -0000)]
use get_local_var_value() rather than getenv() when working with PS1/PS2/HOME, respect the PS2 env var, and make sure that the prompt changes whenever PS1/PS2 changes so we dont have to re-exec the shell to get a changed prompt

15 years agoinetd: constify data
Denis Vlasenko [Wed, 22 Apr 2009 23:25:48 +0000 (23:25 -0000)]
inetd: constify data

15 years agoadduser/addgroup: support specifying uid/gid, add system
Denis Vlasenko [Wed, 22 Apr 2009 21:35:52 +0000 (21:35 -0000)]
adduser/addgroup: support specifying uid/gid, add system
 account creation mode. By Tito.

function                                             old     new   delta
adduser_main                                         650     726     +76
addgroup_main                                        341     402     +61
addgroup_longopts                                      -      16     +16
adduser_longopts                                      97     103      +6
packed_usage                                       26161   26163      +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 161/0)             Total: 161 bytes

15 years agohttpd: fix small bug in parser. it crept in during cleanup
Denis Vlasenko [Wed, 22 Apr 2009 14:16:59 +0000 (14:16 -0000)]
httpd: fix small bug in parser. it crept in during cleanup

15 years agohttpd: allow empty lines in conf file
Denis Vlasenko [Wed, 22 Apr 2009 13:52:22 +0000 (13:52 -0000)]
httpd: allow empty lines in conf file

15 years agohttpd: simplify insane conf file parser
Denis Vlasenko [Wed, 22 Apr 2009 13:49:16 +0000 (13:49 -0000)]
httpd: simplify insane conf file parser

function                                             old     new   delta
bb_simplify_abs_path_inplace                           -      98     +98
parse_expr                                           824     832      +8
passwd_main                                         1025    1027      +2
evalvar                                             1374    1376      +2
parse_command                                       1463    1460      -3
bb_simplify_path                                     137      55     -82
parse_conf                                          1572    1422    -150
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 3/3 up/down: 126/-251)         Total: -125 bytes

15 years agosyslogd: added comment, no code changes
Denis Vlasenko [Wed, 22 Apr 2009 02:53:02 +0000 (02:53 -0000)]
syslogd: added comment, no code changes

15 years agohttpd: improve help text
Denis Vlasenko [Wed, 22 Apr 2009 00:26:39 +0000 (00:26 -0000)]
httpd: improve help text