| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
sha1_process_block64 4149 3950 -199
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
sha1_process_block64 364 732 +368
static.rconsts 16 - -16
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 368/-16) Total: 352 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
sha1_process_block64 364 4167 +3803
static.rconsts 16 - -16
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 3803/-16) Total: 3787 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
sha1_process_block64 356 342 -14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|\|
| |
| |
| | |
Fix merge conflict in coreutils/timeout.c.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
pw_encrypt 978 971 -7
.rodata 108208 108192 -16
des_crypt 1211 1181 -30
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-53) Total: -53 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Upstream commit 94eb1c4dc (libbb: better coreutils compatibility
for realpath) made some changes to xmalloc_realpath_coreutils().
This now needs to be updated to handle Windows paths.
- Expose the macro is_unc_path() and part of the recent change to
bb_get_last_path_component_nostrip() as a separate funtion,
get_last_slash();
- Convert a couple of errors relating to network filesystems to
ENOENT;
- Adjust xmalloc_realpath_coreutils() to handle Windows directory
separators, relative paths and UNC paths.
|
|\| |
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
get_user_strings - 52 +52
get_homedir_or_NULL - 23 +23
parse_and_put_prompt 823 838 +15
null_str 1 - -1
complete_cmd_dir_file 814 812 -2
deinit_S 51 42 -9
read_line_input 3059 3015 -44
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/3 up/down: 90/-56) Total: 34 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
re_execed_comm - 46 +46
main 72 86 +14
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 60/0) Total: 60 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
display 85 1463 +1378 -73 bytes
select_and_cluster - 1088 +1088 -139 bytes
parse_reply - 979 +979 -109 bytes
zbc_num_sqrt - 632 +632 -191 bytes
show_bridge_port - 585 +585 -56 bytes
sp_256_proj_point_add_8 - 576 +576 -45 bytes
encode_then_append_var_plusminus - 554 +554 -118 bytes
read_mode_db - 537 +537 -47 bytes
fbset_main 1331 747 -584
sp_256_ecc_mulmod_8 1157 536 -621
brctl_main 2189 1548 -641
expand_one_var 2544 1872 -672
zxc_vm_process 6412 5589 -823
send_queries 1813 725 -1088
recv_and_process_peer_pkt 2245 1018 -1227
bb_dump_dump 1531 80 -1451
------------------------------------------------------------------------------
(add/remove: 7/0 grow/shrink: 1/8 up/down: 6329/-7107) Total: -778 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
- This can act as memory barrier in clang to avoid
read before assign of a const ptr
Signed-off-by: LoveSy <shana@zju.edu.cn>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add some tests which coreutils realpath pass but BusyBox realpath
fails (bar one). Adjust xmalloc_realpath_coreutils() so the tests
pass:
- Expand symbolic links before testing whether the last path component
exists.
- When the link target is a relative path canonicalize it by passing
it through xmalloc_realpath_coreutils() as already happens for
absolute paths.
- Ignore trailing slashes when finding the last path component and
correctly handle the case where the only slash is at the start of
the path. This requires ignoring superfluous leading slashes.
- Undo all changes to the path so error messages from the caller show
the original filename.
function old new delta
xmalloc_realpath_coreutils 214 313 +99
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
While at it, change all "__asm__" to "asm"
Co-authored-by: canyie <31466456+canyie@users.noreply.github.com>
Signed-off-by: YU Jincheng <shana@zju.edu.cn>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
main 68 65 -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3) Total: -3 bytes
text data bss dec hex filename
1472 560 16 2048 800 busybox_old
1398 552 16 1966 7ae busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Finding the last component of a path didn't properly handle a
mixture of slashes and backslashes, paths relative to another
drive or bare UNC paths. The following were incorrect:
$ basename /dir\\file
dir\file
$ basename c:file
c:file
$ basename //HOST/share
share
With this patch the results are now:
$ basename /dir\\file
file
$ basename c:file
file
$ basename //HOST/share
//HOST/share
|
| |
| |
| |
| |
| | |
As the comment pointed out is_absolute_path() was misnamed. Rename
it to is_relative_path() and change the sense of all tests.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 9fe1548bb (date,touch: allow timezone offsets in dates)
mentioned the similarity between '@' format dates and those with
timezone offsets. It didn't notice that as a result there's
common code which can be shared.
function old new delta
parse_datestr 730 687 -43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-43) Total: -43 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
.rodata 104185 104180 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the mode_string array is no longer static we can't rely on
it being NUL terminated.
function old new delta
bb_mode_string 115 118 +3
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
print_stat 861 869 +8
header_verbose_list_ar 73 77 +4
display_single 975 979 +4
header_verbose_list 237 239 +2
bb_mode_string 124 115 -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 18/-9) Total: 9 bytes
text data bss dec hex filename
1043136 559 5052 1048747 1000ab busybox_old
1043153 559 5020 1048732 10009c busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
bb_parse_mode 393 398 +5
static.who_mask 16 8 -8
static.perm_mask 24 12 -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 5/-20) Total: -15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Create mingw_strptime() to return timezone offset as a separate
argument (since Microsoft's struct tm doesn't have the required
member).
Import timegm() from musl.
Update parse_datestr() to use mingw_strptime().
Enable FEATURE_TIMEZONE in the default configuration.
GitHub issue #230.
|
|\|
| |
| |
| | |
Disable FEATURE_TIMEZONE for now.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow ISO 8601 style dates to include a timezone offset. Like
the '@' format these dates aren't relative to the user's current
timezone and shouldn't be subject to DST adjustment.
- The implementation uses the strptime() '%z' format specifier.
This an extension which may not be available so the use of
timezones is a configuration option.
- The 'touch' applet has been updated to respect whether DST
adjustment is required, matching 'date'.
function old new delta
parse_datestr 624 730 +106
static.fmt_str 106 136 +30
touch_main 388 392 +4
date_main 818 819 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 141/0) Total: 141 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The default build uses strptime() in parse_datestr() to support the
'month_name d HH:MM:SS YYYY' format of GNU date. If we've linked
with strptime() there's an advantage is using it for other formats
too.
There's no change to the non-default, non-DESKTOP build.
function old new delta
fmt_str - 106 +106
.rodata 99216 99145 -71
parse_datestr 948 624 -324
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 106/-395) Total: -289 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
function old new delta
.rodata 104251 104232 -19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also, no need to preserve errno
function old new delta
.rodata 104247 104241 -6
bb_lookup_port 97 83 -14
nc_main 1039 1018 -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-41) Total: -41 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| | |
Reduce amount of wasted space in the signals[][] array.
Saves 48 bytes.
|
| |
| |
| |
| |
| | |
Upstream has fixed a problem with 'busybox --help' so it's
possible to remove another gratuitous divergence.
|
| |
| |
| |
| |
| |
| |
| | |
Use xrealloc_getcwd_or_warn() instead of a hand-rolled WIN32
equivalent.
Saves 84 bytes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our realpath(3) implementation uses xmalloc_follow_symlinks() to
expand symlinks. This detects when symlinks are too deeply nested
but didn't set errno, so anything calling realpath(3) was unable to
say what had gone wrong. (For example, 'ls -L' or 'stat -L'.)
Set errno to ELOOP.
This then leads to the problem that Windows doesn't know about
ELOOP so reports 'Unknown error'. Add a replacement for strerror(3)
which returns a sensible message.
Costs 96 bytes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
file_is_executable() calls access(2) and stat(2); in this case our
WIN32 implementation also calls stat(2). Avoid this unnecessary
duplication by copying the required test from the WIN32 access(2).
In find_executable() it's possible to avoid calling file_is_executable()
if add_win32_extension() returns TRUE as the latter will already have
verified that the file is executable.
Replace a call to file_is_executable() in the tab completion code
with the equivalent tests, avoiding (up to) two calls to stat(2).
These changes don't affect the size of the binary and should be
faster.
|
| |
| |
| |
| |
| | |
Tweak code to avoid contamination of the POSIX build. There
weren't any adverse effects, but better safe than sorry.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If it's needed, there has to be a comment why. There isn't.
function old new delta
.rodata 103686 103669 -17
remove_file 598 571 -27
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-44) Total: -44 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
.rodata 103681 103722 +41
packed_usage 33698 33717 +19
copy_file 1678 1696 +18
cp_main 500 492 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 78/-8) Total: 70 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
xxd_main 710 888 +178
.rodata 103252 103331 +79
print_C_style - 78 +78
packed_usage 33639 33652 +13
next 276 278 +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 350/0) Total: 350 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Was:
xxd: FILE: No such file or directory
xxd: FILE: Bad file descriptor
function old new delta
next 276 278 +2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
xxd_main 680 710 +30
xstrtoll - 30 +30
bb_dump_dump 1511 1531 +20
rewrite 941 951 +10
packed_usage 33629 33639 +10
.rodata 103250 103252 +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/0 up/down: 102/0) Total: 102 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the structure returned by getmntent(3) static so it persists
after endmntent(3) closes the stream. No current caller in the
WIN32 port needs this functionality but it's good to match the
documented behaviour.
Populate more fields of the mntent structure in find_mount_point().
This is required to support the df -t and -T flags recently added
upstream.
The static structures used here are allocated on demand. Separate
static structures are used in each case because df iterates through
mounts calling statfs(2) on each and the WIN32 implementation of
statfs(2) calls find_mount_point().
|
|\| |
|