du has issues with files reporting large block counts on
32-bit systems with 4 byte longs. From looking at the stat.c code, it
seems the preference is to use 'long long', rather than blkcnt_t.
function old new delta
du 420 444 +24
du_main 317 321 +4
print 43 41 -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 28/-2) Total: 26 bytes
Signed-off-by: Ian Wienand <ianw@vmware.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
sizeof(long) != sizeof(mode_t), this causes the compare in
bb_make_directory of (long)-1 != (mode_t)-1 to fail and mess up
the permissions of final directory by doing chmod((mode_t) -1).
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This is useful when you have multiple ISPs with failover. It allows
setting the priority of the static gateway and makes it possible
to specify multiple static gateways.
The ubuntu ifupdown supports it.
function old new delta
.rodata 116725 116797 +72
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 72/0) Total: 72 bytes
text data bss dec hex filename
953343 7313 8984 969640 ecba8 busybox_old
953415 7313 8984 969712 ecbf0 busybox_unstripped
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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>
If multiple consoles are found from the sysfs file, cttyhack fails:
cttyhack: can't open '/dev/tty0 ttyS0': No such file or directory
In such cases take the last one as the kernel will use that one for
/dev/console.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
When built with "sendfile" support, httpd was unable to send large files
(>2 GB) in one single connection, terminating it before the full file
has been sent.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
While at it, optimized :s/find/repl/ a bit
function old new delta
text_hole_make 120 150 +30
colon 2848 2844 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
I am using quilt to manage patches internally. Quilt creates dir .pc
and stores unmodified files there. Since I made change in one of
Config.src quilt made a copy in .pc/xxx.patch/xxx/Config.src. When
I run make it calls gen_build_files.sh and it generates
.pc/xxx.patch/xxx/Config.in. Now when I want to pop patch quilt
thinks I have made changes to original xxx/Config.in.
IMO the best solution is just to ignore hidden directories in
gen_build_files.sh. This also results in shorter build time in case
busybox is under git/svn versioning, since it avoids searching
many directories for Config.src.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This allows to find mount points of 'char' devices such as UBI volumes
which otherwise fail for example with 'df' command:
/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 72091984 12360980 56068924 18% /
devtmpfs 115236 4 115232 0% /dev
tmpfs 28672 32 28640 0% /tmp
/dev/ubi0_0 360268 18348 341920 5% /tmp/mnt/userfs
/ # df /dev/ubi0_0
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 115236 4 115232 0% /dev
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
First change fixes "read -n NUM". Apparently poll() won't report
data availability if cc[VMIN] > 1 until there are at least cc[VMIN] bytes.
function old new delta
read_line_input 3885 3877 -8
shell_builtin_read 1097 1087 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18) Total: -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>