Denys Vlasenko
fd77ea505e
mark get_shell_name FAST_FUNC
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-10-03 09:42:21 +02:00
Denys Vlasenko
2ffd710656
platform.h: disable ALIGNn macros for s390[x]
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-08-06 17:17:15 +02:00
Aurelien Jarno
d3a42391b1
*: declare strings with ALIGN1, as appropriate
...
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24 16:28:34 +02:00
Michael Tokarev
32f774cd34
*: declare strings with ALIGN1, as appropriate
...
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24 15:56:37 +02:00
Denys Vlasenko
440a509849
dpkg: fix creation of .list files (were empty since b768aeb
). Closes 5324
...
While at it, fix filename order and free the list of names.
function old new delta
llist_rev - 21 +21
get_header_tar 1733 1741 +8
unpack_package 587 585 -2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 29/-2) Total: 27 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 16:27:21 +02:00
Denys Vlasenko
c9a13116a4
mount: fix the wrongly stored fs creation time
...
This bug made our ext2 images non-mountable by ext4 driver.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21 16:50:46 +02:00
Denys Vlasenko
2bc495e4c4
adduser: install to /usr, not /, like all other similar tools
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-20 20:35:58 +02:00
Denys Vlasenko
dac8e79a19
Move several applets to different install dir:
...
Moved to [/usr]/sbin:
addgroup, adduser, delgroup, deluser,
arping, chat, ether-wake, fdformat, ifplugd,
ip, ipaddr, iplink, iproute, iprule, iptunnel,
killall5, readahead, rtcwake, tftpd, add-shell, remove-shell, powertop.
Moved to /bin for /usr/bin: kbd_mode.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-20 20:24:57 +02:00
Denys Vlasenko
ac164dd2a7
volume_id/ext: use common bb_e2fs_defs.h for ext2/3/4 constants and structs
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-12 15:00:35 +02:00
Pascal Bellard
70fc8c17e2
su: do not change to home dir unless -l
...
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-12 13:21:02 +02:00
Tias Guns
3645195377
platform.h: Android tweaks: ioprio defines, BB_ADDITIONAL_PATH
...
Signed-off-by: Tias Guns <tias@ulyssis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-10 14:26:32 +02:00
Natanael Copa
02112d8ae3
unzip: ignore chmod errors
...
This makes unzip to FAT filesystems not exit with error.
This is similar to how the "normal" unzip works.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-28 01:29:15 +02:00
Ron Yorston
576b1d3c41
sendmail: use host rather than NIS domain name for HELO
...
According to RFC 5321 the argument to HELO "contains the fully-qualified
domain name of the SMTP client" or its IP address if no FQDN is available.
BusyBox sendmail uses the NIS domain name instead which, in many cases,
is likely to be the default "(none)". [vda: yes, I checked my machine
and its uts.domainname was indeed "(none)"]
Using the host name is more likely to satisfy the intent of the RFC while
allowing the otherwise unused safe_getdomainname function to be removed.
Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-28 17:04:19 +02:00
Denys Vlasenko
176bc34475
Drop include/bb_linux_ext2_fs.h, use existing e2fsprogs/e2fs_defs.h
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-17 15:06:55 +02:00
Denys Vlasenko
0b2b0f31a3
Create and use our own copy of linux/ext2_fs.h
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-13 16:39:18 +02:00
Denys Vlasenko
faac1d3e6e
tar,rpm2cpio: check that child decompressor did not error out
...
function old new delta
check_errors_in_children - 57 +57
tar_main 833 848 +15
get_header_tar 1720 1733 +13
rpm2cpio_main 147 140 -7
handle_SIGCHLD 41 - -41
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/1 up/down: 85/-48) Total: 37 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:33:42 +01:00
Denys Vlasenko
8a6a2f9c9c
update seamless uncompression code
...
This change makes "tar tf hello_world.txz" work without
adding special-casing for ".txz" extension. It also removes
ever-growing magic checking code in rpm2cpio and get_header_tar -
we reuse one which lives in setup_unzip_on_fd.
function old new delta
unpack_gz_stream 7 566 +559
check_signature16 - 70 +70
setup_unzip_on_fd 99 142 +43
handle_SIGCHLD - 41 +41
unpack_bz2_stream 342 376 +34
unzip_main 2352 2385 +33
bbunpack 503 533 +30
open_transformer 74 102 +28
unpack_Z_stream 1278 1304 +26
unpack_gunzip 101 123 +22
init_transformer_aux_data - 18 +18
unpack_xz_stream 2388 2402 +14
open_zipped 131 141 +10
rpm_main 1358 1363 +5
get_header_tar_lzma 52 57 +5
get_header_tar_bz2 52 57 +5
unpack_lzma_stream 2698 2702 +4
hash_find 234 233 -1
get_header_tar 1759 1733 -26
get_header_tar_gz 92 57 -35
unpack_uncompress 51 12 -39
rpm2cpio_main 201 147 -54
unpack_unxz 67 12 -55
unpack_bz2_stream_prime 55 - -55
get_header_tar_Z 86 - -86
unpack_gz_stream_with_info 539 - -539
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890) Total: 57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:27:48 +01:00
Denys Vlasenko
59655077c5
preparatory cleanups for seamless uncompression improvements
...
unpack_gz_stream_with_info: fix buggy error check
man: fix possible accesses past the end of a string
move seamless uncompression helpers from read_printf.c to open_transformer.c
function old new delta
show_manpage 153 212 +59
unpack_gz_stream_with_info 520 539 +19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:23:50 +01:00
Denys Vlasenko
e8cfc3f693
blkid: if parameters are given, do not scan /dev
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-03 15:09:07 +01:00
Denys Vlasenko
6111f967f5
tar: add support for PAX-encoded path=LONGFILENAME
...
function old new delta
get_header_tar 1478 1759 +281
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-23 13:45:18 +01:00
Jonh Wendell
9106107a50
Make unix (local) sockets work without IPv6 enabled
...
The xsocket_type() function had an optional "family" argument
that was enabled only if IPv6 is enabled. In the case of the
function was called with a valid AF_UNIX argument, and IPv6 is
disabled, this argument was silently ignored.
This patch makes the "family" argument mandatory, while keeping
the old behavior i.e., if AF_UNSPEC is passed, we try first IPv6
(if it's enabled) and fallback to IPv4.
Also I changed all callers of xsocket_type() to reflect its new
interface.
Signed-off-by: Jonh Wendell <jonh.wendell@vexcorp.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-09 15:14:33 +01:00
Denys Vlasenko
499597d6ef
mdev: do not treat non-leading '#' chars as start of comment. Closes 4676
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-11 00:37:17 +01:00
Denys Vlasenko
3e0c428c45
Move include <shadow.h> close to pwd.h and grp.h includes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-08 16:13:55 +01:00
Denys Vlasenko
a76dd50ce1
Move Adroid endgrent() and endpwent() NOPS to libbb.h
...
They should be after includes of pwd.h and grp.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-08 16:11:38 +01:00
Denys Vlasenko
6b64a26976
platform.h: define endgrent() and endpwent() as no-ops on Android
...
Surprisingly, bionic libc seems to lack these functions.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-06 16:23:18 +01:00
Denys Vlasenko
f282c6b657
libbb: remove is_directory's argument which is always NULL
...
function old new delta
send_cgi_and_exit 892 890 -2
ln_main 447 445 -2
handle_incoming_and_exit 2784 2780 -4
is_directory 66 59 -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19) Total: -15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-18 03:27:46 +01:00
Michael McTernan
7b57ff4436
udhcp: finish support of classless static routes
...
function old new delta
udhcp_str2optset 415 532 +117
Signed-off-by: Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-16 17:05:52 +01:00
Denys Vlasenko
b8ff9357d5
suppress a "integer overflow in expression" waring on big endian. Closes 4405
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-05 04:54:14 +01:00
Denys Vlasenko
d2277e262f
nommu: fix cases where we mangle argv[0][0]
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-22 17:19:26 +01:00
Denys Vlasenko
1dc80bae0b
libbb.h: add check for bad off_t size detection
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-17 21:51:32 +01:00
Denys Vlasenko
f59a50ee30
libbb.h: tighten up macro code
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-16 21:30:19 +01:00
Peter Korsgaard
743edac6c8
bb_daemonize_or_rexec(): add flag to double-fork; use it in start-stop-daemon
...
Add a DAEMON_DOUBLE_FORK flag to make bb_daemonize double-fork so it isn't a
session leader, and hence doesn't get a controlling tty on Linux if a tty is
ever opened, similar to how libdaemon's daemon_fork or the big
start-stop-daemon does it - And use it in start-stop-daemon.
For details, see http://www.win.tue.nl/~aeb/linux/lk/lk-10.html#ss10.3
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-09 19:44:37 +01:00
Denys Vlasenko
9ce09bc9cb
lineedit: add support for M-b, M-f, M-d, M-Backspace
...
function old new delta
ctrl_left - 96 +96
ctrl_right - 76 +76
static.esccmds 81 93 +12
read_line_input 3876 3885 +9
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 193/0) Total: 193 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-03 13:28:22 +01:00
Leonid Lisovskiy
328f27fe44
libbb: split decode_base64 off read_base64
...
function old new delta
decode_base64 - 182 +182
read_base64 378 255 -123
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 182/-123) Total: 59 bytes
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-28 13:59:55 +02:00
Denys Vlasenko
ec447c7f01
libbb.h: remove unused defines
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-24 04:06:18 +02:00
Denys Vlasenko
1f56e51ca1
udhcpc: add support for DHCP option 212 (RFC 5969)
...
The patch is from OpenWRT people.
function old new delta
xmalloc_optname_optval 637 874 +237
dhcp_option_strings 237 243 +6
dhcp_optflags 68 70 +2
len_of_option_as_string 12 13 +1
dhcp_option_lengths 12 13 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 247/0) Total: 247 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-19 22:40:35 +02:00
Oliver Metz
cc87588a61
disable strverscmp usage if we build against uClibc-0.9.31
...
Signed-off-by: Oliver Metz <oliver.metz@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-09 02:08:42 +02:00
Denys Vlasenko
d184a728cf
rename archive.h to bb_archive.h. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 12:45:14 +02:00
Denys Vlasenko
16714245f9
add INIT_G()'s. No code changes.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-21 01:59:15 +02:00
Denys Vlasenko
5c6ba6c56f
mdev: expand --help so that it's actually useful.
...
function old new delta
packed_usage 28634 28822 +188
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-19 12:18:11 +02:00
Denys Vlasenko
13e709c53f
losetup: implement -r option. Closes 4033.
...
function old new delta
packed_usage 28595 28633 +38
losetup_main 285 290 +5
singlemount 906 908 +2
set_loop 674 672 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-12 08:30:16 +02:00
Denys Vlasenko
dd1061b6a7
wget: URL-decode user:password before base64-encoding it into auth hdr. Closes 3625.
...
function old new delta
percent_decode_in_place - 152 +152
parse_url 304 317 +13
handle_incoming_and_exit 2795 2798 +3
httpd_main 763 760 -3
decodeString 152 - -152
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 168/-155) Total: 13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-11 21:04:02 +02:00
Denys Vlasenko
d48fdde370
stop declariong our own dirname prototype
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-10 13:48:34 +02:00
Denys Vlasenko
e0894f567a
Android build fixes and alternate (hopefully simpler) defconfig for it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-09 18:00:44 +02:00
Baruch Siach
e8f36330d9
networking: consolidate the IP checksum code. -129 bytes.
...
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-07 17:55:40 +02:00
Denys Vlasenko
e45af7ad17
lineedit: remove SAVE_HISTORY bit, ->hist_file can be used as indicator
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-04 16:15:24 +02:00
Denys Vlasenko
bede215cf1
lineedit: add support for history saving on exit
...
Based on the patch by Dennis Groenen <tj.groenen@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-04 16:12:33 +02:00
Matthias Andree
1285437217
Fixes for FreeBSD build
...
Signed-off-by: Matthias Andree <mandree@freebsd.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-28 05:05:02 +02:00
Pere Orga
b1611d9a46
hostid: fix behavior on identifiers starting with zeros
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-16 23:36:10 +02:00
Denys Vlasenko
a6367f9fae
remove extra IF_WHO()
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-09 10:28:28 +02:00