Commit Graph

12988 Commits

Author SHA1 Message Date
Joshua Kahlenberg
c439851438 sysctl: implement -q
function                                             old     new   delta
packed_usage                                       29208   29223     +15
sysctl_act_recursive                                 605     598      -7
sysctl_main                                          233     222     -11

Signed-off-by: Joshua Kahlenberg <jbkberg@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-05 18:15:12 +02:00
walter harms
d1d794fd48 refactor correct_password.c to avoid one if
Signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-04 12:26:20 +02:00
Denys Vlasenko
9b80b903c7 build system: stop .eh_frame generation
From Rich Felker:

By default, modern GCC generates DWARF2 debug/unwind tables in the
.eh_frame section of the object files/binaries. This adds significant
bloat (as much as 15%) to the size of the busybox binary, including
the portion mapped/loaded into memory at runtime (possibly a big issue
for NOMMU targets), and the section is not strippable with the strip
command due to being part of the loaded program text.

I've since done some further checking - both testing and asking the
GCC developers about it - and it seems the solution is to add to the
CFLAGS -fno-unwind-tables and -fno-asynchronous-unwind-tables. If
debugging is disabled, this will prevent GCC from outputting DWARF2
tables entirely. But since busybox builds with -g by default, the
interesting case is what happens then. I originally thought these
options would break debugging, but they don't; instead, they tell GCC
to output the DWARF2 tables in the .debug_frame section instead of
the newish .eh_frame section (used for exception handling). With these
options added, busybox_unstripped is still fully debuggable, and the
final busybox binary loses the 15% bloat factor from the DWARF2
tables.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-04 11:46:44 +02:00
Denys Vlasenko
b7812ce0f7 wget: reorder fread and poll: poll only if fread returns EAGAIN. Closes 5426
function                                             old     new   delta
retrieve_file_data                                   451     427     -24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-03 12:49:30 +02:00
Denys Vlasenko
168f87c531 httpd_indexcgi.c: fix compile failure
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-03 12:20:10 +02:00
Denys Vlasenko
5f10fdf1dd Fix compile failure in ll_proto.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-03 11:41:30 +02:00
Sven-Göran Bergh
c5a9fa2d2a blkid: add support for nilfs2
function                                             old     new   delta
volume_id_probe_nilfs                                  -      99     +99
fs2                                                   52      56      +4

Signed-off-by: Sven-Göran Bergh <svengbergh-busybox@yahoo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 15:34:39 +02:00
Denys Vlasenko
8019b3a7ae volume_id: code shrink
function                                             old     new   delta
volume_id_set_unicode16                              200     173     -27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 15:33:47 +02:00
Sven-Göran Bergh
11f2c0d4f8 blkid: add type display for btrfs
Signed-off-by: Sven-Göran Bergh <svengbergh-busybox@yahoo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 14:56:25 +02:00
Denys Vlasenko
405dafffbb ll_proto.c: code shrink
text    data     bss     dec     hex filename
    762       0       0     762     2fa ll_proto.o.old
    526       0       0     526     20e ll_proto.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 14:29:45 +02:00
Denys Vlasenko
a0fd4a789c style fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 14:29:14 +02:00
Denys Vlasenko
41f7885f06 getty: tweak style, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 13:57:49 +02:00
Denys Vlasenko
9c55143bbf wget: try reading after poll timeout - stdio may have buffered data. Closes 5426
function                                             old     new   delta
retrieve_file_data                                   436     451     +15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-08-16 16:52:27 +02:00
Denys Vlasenko
45c35e9de0 getty: add commented-out extended error diagnostic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-08-16 13:29:25 +02:00
Denys Vlasenko
dba7094d62 login: increase login name size limit from 32 to 64
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-08-15 17:06:37 +02:00
Denys Vlasenko
6567edd10b udhcp[cd]: fix binding to network aliases. Closes 5432, 5438
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-08-10 00:27:22 +02:00
Cliff Frey
4919565c15 lineedit: fix Alt-D when cursor==0
Signed-off-by: Cliff Frey <cliff@meraki.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-08-07 17:59:40 +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
Mike Frysinger
ca81a93722 disable format security warnings
We pass strings to printf directly a lot.  Some distros enable some flags
in their gcc by default like -Wformat-security.  With these two things, we
end up with a lot of build warnings like so:
	loginutils/chpasswd.c:42:3: warning: format not a string literal and
		no format arguments [-Wformat-security]

But we don't care.  Our focus is first and foremost on size, so adding a
lot of dummy calls like:
-	printf(some_constant_string);
+	printf("%s", some_constant_string);
is pointless bloat.

Disable this warning flag if the compiler supports it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-08-04 16:14:24 -04:00
Denys Vlasenko
293c94564c udhcpc: make -O <numeric_opt> work. Closes 5402
function                                             old     new   delta
udhcpc_main                                         2642    2685     +43
udhcp_recv_raw_packet                                414     415      +1
d6_recv_raw_packet                                   248     249      +1
udhcpc6_main                                        2430    2413     -17
add_client_options                                   239     213     -26
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 45/-43)              Total: 2 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-27 13:25:07 +02:00
Bradley M. Kuhn
0e941d5427 Simplify copyright/license notice that appears in the binary.
Existing copyright notice for binary would need to be longer to achieve
optimal accuracy.  This compromise punts to the source for full notices,
but does note the years of the copyrights and that there are many authors,
all licensing under GPLv2.

Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org>
Signed-off-by: Tony Sebro <tony@sfconservancy.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-26 13:17:06 +02:00
Denys Vlasenko
5cfb818181 Add yet another missing ALIGN2 on a global declaration.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-26 12:58:41 +02:00
Denys Vlasenko
71045cc819 dhcpd: write lease file on exit
function                                             old     new   delta
udhcpd_main                                         1431    1403     -28

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24 17:21:26 +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
Yao Zhao
e565383fd5 testsuite: make mkfs.minix test not fail spuriously on big endian
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24 13:58:12 +02:00
Mimi Li
37a79c092e sed: allow 'w' cmd to use two address form
function                                             old     new   delta
add_cmd                                             1101    1094      -7

Signed-off-by: Mimi Li <felloak@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24 13:20:12 +02:00
Denys Vlasenko
dbed6c4b46 tftpd: fix -u USER to work with chroot. Closes 5348
function                                             old     new   delta
tftpd_main                                           546     568     +22
tftp_protocol                                       1844    1839      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-18 17:32:32 +02:00
Denys Vlasenko
df8066a78c awk: fix FS assignment behavior. Closes 5108
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-11 01:27:15 +02:00
Denys Vlasenko
e1db338a51 ftpd: free allocated string on error path
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-11 00:26:24 +02:00
Denys Vlasenko
3bb858765e ftpd: fix MDTM's month value. Closes 5336
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-11 00:16:08 +02:00
Denys Vlasenko
566a313a7f ash: add a comment about VEXPORT
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-07 21:40:35 +02:00
Linus Walleij
b5c7220e7b fbset: respect rgba configuration lines in fb.modes
The fbset utility would not respect "rgba" config entries in
the fb.modes file such as this (for the ARM Integrator/CP):

mode "640x480-60-clcd"
    # D: 25.175 MHz, H: 31.469 kHz, V: 59.94 Hz
    geometry 640 480 640 480 16
    timings 39722 48 16 33 10 96 2
    rgba 5/10,5/5,5/0,1/15
endmode

This is important especially for this ARGB5551 device which
is hopeless to configure otherwise. I noticed this lacking
feature after the TI "fbtest" program managed to set up the
the colormode correctly.

Signed-off-by: Linus Walleij <triad@df.lth.se>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-07 19:58:15 +02:00
Eric Martin
5345b8db8b acpid: add missing lid switch definition
This patch adds a missing LID0 switch definition.
Without it, closing the notebook lid is not detected by acpid.

Signed-off-by: Eric Martin <eric.martin@gmx.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-07 19:06:50 +02:00
Mike Frysinger
c5fe9f7b72 include sys/resource.h where needed
We use functions from sys/resource.h in misc applets, but don't include
the header.  This breaks building with newer glibc versions, so add the
include where needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-07-05 23:19:09 -04:00
Denys Vlasenko
9ad8979ff1 mount: support strictatime option. Closes 5240
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-26 16:09:00 +02:00
Denys Vlasenko
ea664dde87 awk: make -F STR interpret escape sequences. Closes 5126
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 18:41:01 +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
d52c9510fd trivial small speed optimization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 15:54:05 +02:00
Denys Vlasenko
6ebb2b6b24 mount: do not pass "comment=ANYTHING" option to kernel. Closes 5240
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 15:17:18 +02:00
Denys Vlasenko
a396ade9f8 mount: undo recent breakage when mount flags were made unsigned
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-22 15:06:27 +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
9ee4266490 mount: set up RO loop device if mount -o ro. Closes 4784
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21 12:08:56 +02:00
Denys Vlasenko
1d7ad7a022 tweak help texts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21 09:45:11 +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
e3e0d2b812 tweak help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-19 12:46:59 +02:00
Bernhard Walle
9b78e14dfb build system: fix build of kconfig on Darwin
Of course busybox cannot be used on Darwin (Mac OS X), but it can be
cross-compiled for Linux there. Cross-compilation still requires kconfig
to be built as native host tool.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-18 01:51:26 +02:00
Denys Vlasenko
aacd448601 wget: fix wget-supports--P testsuite failure. Closes 4940
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-17 20:21:30 +02:00
Pierre Carrier
e0a6004ce8 config: do not refer to HTTPS for wget
Signed-off-by: Pierre Carrier <pierre@spotify.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-17 19:59:53 +02:00