Age | Commit message (Collapse) | Author |
|
Make umount -f more compatible with util-linux 2.22.2.
Before:
* 'umount -f': calls umount syscall,
if it fails calls umount2 with 'MNT_FORCE'
* 'mount -f -l': calls umount syscall,
if it fails calls umount2 with 'MNT_LAZY'. 'MNT_FORCE' dropped
After:
* 'umount -f': calls umount2 syscall with 'MNT_FORCE'
* 'mount -f -l': calls umount2 syscall with 'MNT_LAZY' and 'MNT_FORCE'
function old new delta
umount 45 - -45
umount_main 610 555 -55
Signed-off-by: Anton Bondarenko <anton.bondarenko@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
.rodata 157069 157133 +64
adduser_main 921 936 +15
adduser_longopts 103 110 +7
packed_usage 30230 30236 +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 92/0) Total: 92 bytes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Rename the defines not present in linux UAPI headers to better reflect
their purpose.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Most applets include linux' user API headers instead of duplicating
the definitions. Make it the case for i2c-tools as well.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Testcase:
$ printf '%s\n' a/a:a a:b | sort -t: -k1,1
a:b
a/a:a
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Suggested by Bartosz Golaszewski.
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Modprobe wasn't correctly parsing module arguments containing spaces from
/proc/cmdline - E.G. module.property="some text".
Extend the parsing to correctly handle quoted text.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Commit 549deab caused this sequence of commands:
mkdir foo
cd foo
touch a b
echo "./"*
to return './*' instead of the expected './a ./b'. The problem
was caused by the backport of commit 880d952 from dash. In dash
the issue was fixed by two further commits by Herbert Xu:
<d6d06ff> [EXPAND] Fixed non-leading slash treatment in expmeta
<36f0fa8> [EXPAND] Fix slash treatment in expmeta
(See git://git.kernel.org/pub/scm/utils/dash/dash.git)
Apply these fixes to BusyBox ash, thus causing the new test
glob3.tests to succeed.
function old new delta
expmeta 469 528 +59
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Test corner cases too like looking for an empty prefix etc.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
login_main 978 996 +18
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
enabled
Similar to the "big" util-linux version. For !DMESG_PRETTY, the option is accepted
(but ignored) as well, for compatibility reasons.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
When a static interface with explicit gateway and metric in /etc/network/interfaces
is enabled using 'ifup', and further, the BusyBox 'ip' applet is enabled, the
following error message appears at the console (and no default route is added):
ip: either "to" is duplicate, or "prio" is garbage
Tracing ifup reveals that it is attempting to run the following shell command:
ip route add default via <GW> dev <DEVICE> prio <METRIC>
'ip' does not understand the 'prio' argument, causing this error. With 'metric',
it works fine.
Signed-off-by: Alex Dowad <alexinbeijing@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
setsockopt_int - 23 +23
do_load 918 934 +16
setsockopt_SOL_SOCKET_int - 14 +14
setsockopt_keepalive - 10 +10
setsockopt_SOL_SOCKET_1 - 10 +10
buffer_fill_and_print 169 178 +9
setsockopt_1 - 8 +8
nfsmount 3560 3566 +6
redirect 1277 1282 +5
tcpudpsvd_main 1782 1786 +4
d6_send_kernel_packet 272 275 +3
i2cget_main 380 382 +2
ed_main 2544 2545 +1
scan_recursive 380 378 -2
nbdclient_main 492 490 -2
hash_find 235 233 -2
cmdputs 334 332 -2
parse_command 1443 1440 -3
static.two 4 - -4
ntpd_main 1039 1035 -4
const_int_1 4 - -4
const_IPTOS_LOWDELAY 4 - -4
RCVBUF 4 - -4
ntp_init 474 469 -5
change_listen_mode 316 310 -6
uevent_main 416 409 -7
arping_main 1697 1690 -7
telnet_main 1612 1603 -9
socket_want_pktinfo 42 33 -9
setsockopt_reuseaddr 21 10 -11
setsockopt_broadcast 21 10 -11
httpd_main 772 757 -15
get_remote_transfer_fd 109 94 -15
make_new_session 503 487 -16
ftpd_main 2177 2160 -17
read_bunzip 1896 1866 -30
common_traceroute_main 4099 4058 -41
common_ping_main 1836 1783 -53
------------------------------------------------------------------------------
(add/remove: 5/4 grow/shrink: 8/21 up/down: 111/-283) Total: -172 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Static build with CONFIG_PAM fails on Debian Jessie due to undefined
references to libdl and libaudit.
Static build without pam, but with libcrypt required fails as well due
to undefined references to libpthread.
Fix these two cases by adding the missing libraries to LDLIBS when
appropriate.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Since there is no interest in merging a config option for WANT_TIMING,
remove the parts of code depending on it altogether.
While we're at it: add some newlines to improve readability.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
In the initial submission struct bbunit_listelem was manipulated by
custom list functions implemented in bbunit.c. Since the tests are now
added to the list by llist_add_to_end(), which allocates the llist_t
objects behind the scenes, there's no need for the *next field.
function old new delta
unit_main 142 141 -1
bbunit_strrstr_elem 24 16 -8
bbunit_obscure_weak_pass_elem 24 16 -8
bbunit_obscure_strong_pass_elem 24 16 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-25) Total: -25 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Commit 1ecb996 attempted to make read_lines() use the last column of
the terminal (as re_wrap() did). There were two problems with this:
- The size of the buffer allocated for lines wasn't increased to allow
for the extra character.
- The test for width overflow was moved after the point where the
next character was added to the buffer. This caused a buffer overflow
in certain circumstances.
For example, if the line beyond the end of the display was wider than
the display read_lines() would initially read the partial line into a
buffer. When the user moved down read_lines() would be called again
to ensure the rest of the line was read. This would place the next
character in the partial line before checking for overflow.
This can be fixed by moving the test for overflow back to where it was
before commit 1ecb996 and changing the comparison to `>` rather than
`>=`.
There are two other places where buffers are created without allowing
for width+1 characters.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Ron Yorston <rmy@frippery.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
send_arp_request - 185 +185
zcip_main 1273 1272 -1
pick_nip 40 - -40
arp 185 - -185
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/1 up/down: 185/-226) Total: -41 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
zcip_main 1263 1230 -33
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
zcip_main 1411 1263 -148
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
A mailing list thread in September 2013 discussed changing the string
returned by the non-POSIX 'uname -o' option. Nothing ever came of this
because there was no agreement as to what the string should be.
Make the string configurable so that people can decide for themselves.
Signed-off-by: Ron Yorston <rmy@frippery.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Test explicitly for REOPEN flags: update_num_lines is called
unconditionally so (num_lines != NOT_REGULAR_FILE) is also true when
num_lines contains a valid number of lines.
The call to fstat doesn't need to be in #if ENABLE_FEATURE_LESS_FLAGS:
the whole function is already in such a test.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Add testcases for -B and single line changes.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Fix -B with single line changes. They were always ignored regardless
if they were blank or not.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
When read_lines tests whether a character will fit on the current
line it checks the *next* character but in case of overflow doesn't
display the *current* one. This results in the last column of the
terminal never being used.
The test in re_wrap (used when the terminal width changes or line
numbers are enabled/disabled) is different: it does allow the use
of the final column.
function old new delta
read_lines 764 770 +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 6/0) Total: 6 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Much of the code refers to lines using indices into the flines
array (which splits lines into portions that fit on the terminal).
In some cases this is wrong and actual line numbers should be
used:
- when lines are being truncated rather than wrapped (-S flag)
- when line numbers have been entered by the user
Also fix a bug in numeric input and improve the display at EOF.
function old new delta
goto_lineno - 111 +111
cap_cur_fline - 101 +101
buffer_to_line - 56 +56
buffer_up 35 66 +31
less_main 2606 2615 +9
goto_match 125 127 +2
buffer_down 81 56 -25
buffer_line 64 - -64
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/1 up/down: 310/-89) Total: 221 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Add a function to package the test that detects whether enough has
been read from the file to allow a screenful to be displayed.
Also use this to determine when to display '(END)' in the status
line. The previous code was incomplete and didn't handle truncated
lines (-S flag) properly.
function old new delta
at_end - 63 +63
status_print 111 109 -2
read_lines 819 764 -55
getch_nowait 319 264 -55
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 63/-112) Total: -49 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Move the code to detect non-regular files to the point where the
file is being opened. If num_lines == READING_FILE guarantees
that the file is regular.
Detect when a file becomes unreadable between it first being opened
and the call to update_num_lines. Mark the file as being non-regular
so we don't try that again.
function old new delta
reinitialize 197 245 +48
update_num_lines 159 127 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 48/-32) Total: 16 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
update_num_lines - 159 +159
m_status_print 409 266 -143
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 159/-143) Total: 16 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Currently when you disable fancy echo, escape sequences are hardcoded
enabled (e.g. as if you used `echo -e` all the time). The opposite
behavior is more desirable (always disable -e support) because:
* This seems to contradict the spirit of the kconfig help text (where
it says enable support for -n/-e flags), although you could say that
we aren't supporting the -e flag directly as `echo -e` will show the
-e flag.
* POSIX makes escape sequences optional, and even says they are there
only on XSI-conformant systems.
* It saves space (~100 bytes on x86_64).
* It makes things faster!
* It makes it behave more like bash where you need an explicit -e flag
in order for escape sequences to be interpreted.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
In commit b5c7220e7b2b6611fe5beca494c67bfe51fcfafb
"fbset: respect rgba configuration lines in fb.modes"
I somehow managed to swap the offset/length markers around.
The man page for fb.modes says it should be offset/length
not length/offset as I was accidentally parsing it.
As my fb.modes file was also reversed I didn't notice
until I tried someone elses fb.modes file. Mea culpa.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
While RFC1035 recommends a label not to start with a number, there is
actually no such limitation in dns. One may buy a domain name like
0x1.net and use it.
This commit remove this check and allow a user to use such domains.
Signed-off-by: Arthur Gautier <baloo@gandi.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Make verbose status messages (-m/-M flags) behave more like the
real `less` command:
- fix display of line numbers so they're correct whether lines are
being truncated (-S flag) or wrapped.
- don't display total lines or percentage when lines are read from
stdin: we don't have that information until we reach EOF. When
we do reach EOF the additional information is displayed.
- when lines are read from a file count the total number of lines
so that we can display percentages. Counting lines is avoided
until the information is actually needed. If the user pages to
EOF the separate read pass can be avoided entirely.
Fixes Bug 7586
function old new delta
m_status_print 195 382 +187
safe_lineno - 35 +35
reinitialize 172 182 +10
read_lines 675 685 +10
buffer_fill_and_print 178 169 -9
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 242/-9) Total: 233 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Based on the patch by Ari Sundholm <ari@tuxera.com>
function old new delta
sync_main 20 163 +143
packed_usage 30653 30673 +20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 163/0) Total: 163 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|