| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Use the longPathAware manifest entry to handle path lengths above
260. This requires the LongPathsEnabled registry key to be set
at run-time.
Modify (some) WIN32 API calls to use the wide-character variant.
These features are controlled by the build-time configuration
option FEATURE_LONG_PATHS, which is not enabled by default.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests for long path support (> 260 chars):
- ls-long-path-works, rm-removes-long-path, stat-long-path-works
- ls-long-path-with-dotdot (path normalization)
- ls-long-nonascii-path-works (combined test)
- *-long-path-error-preserves-path (error message integrity)
Tests for path format handling (per README.md):
- ls-path-formats (absolute, .., backslash)
- ls-mixed-slashes, ls-relative-path
Tests for non-ASCII/code page handling:
- ls-nonascii-path-works, rm-nonascii-path-works, stat-nonascii-path-works
- ls-printable-nonascii (commit 8bd8100 regression)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the busybox-w32 binary didn't have an extension the shell was
unable to spawn itself:
$ ls -l busybox
-rwxrwxr-x 1 rmy rmy 661006 Feb 25 09:37 busybox
$ ./busybox sh
$ ls
sh: unable to spawn shell
This happened because the shell used spawnve() from the C runtime
to execute itself. Microsoft insists on trying to add an extension
to the name of the binary unless it has an explicit '.' as its
last character.
Use the internal spawnveq() instead, as it handles various quirks
like the above.
Adds 16-32 bytes.
(GitHub issue #566)
|
| |
|
|
|
|
|
|
|
| |
Merging of upstream changes to ash failed to ensure that applets
could be executed using a Unix-style path.
Move the necessary code from shellexec() to tryexec().
(GitHub issue #565)
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This was confusing:
$ busybox --help
-help: applet not found
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>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
.rodata 107007 107019 +12
run_cmds 62 50 -12
indicate_error 78 55 -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 12/-35) Total: -23 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| | |
function old new delta
colon 3942 3952 +10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
resume_main 560 556 -4
uuidcache_check_device 107 101 -6
ntp_init 1005 997 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-18) Total: -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
.rodata 107010 107007 -3
show_status_line 372 362 -10
colon 3989 3942 -47
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-60) Total: -60 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| | |
function old new delta
colon 4005 3989 -16
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| | |
function old new delta
colon 3977 4005 +28
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| | |
function old new delta
colon 4010 3980 -30
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
acpid_main 1059 1063 +4
resume_main 561 560 -1
unpack_package 642 640 -2
adduser_main 861 859 -2
getty_main 1517 1512 -5
ftpd_main 2149 2142 -7
.rodata 107018 107010 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 4/-25) Total: -21 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
.rodata 107009 107018 +9
parse_stream 3075 3069 -6
buffer_print 612 603 -9
expand_args 159 144 -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 9/-30) Total: -21 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| | |
function old new delta
run_man_pipe 369 420 +51
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
xasprintf_and_free - 49 +49
watch_main 269 282 +13
singlemount 1313 1315 +2
append_mount_options 157 149 -8
ip_port_str 122 112 -10
lsblk_main 869 858 -11
add_cmd 1178 1167 -11
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/4 up/down: 64/-40) Total: 24 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
packed_usage 35949 36009 +60
watch_main 229 269 +40
.rodata 107008 107009 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 101/0) Total: 101 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
isqrt_ull - 84 +84
create_J 1809 1808 -1
isqrt 106 38 -68
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 84/-69) Total: 15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | | |
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
blockdevs
function old new delta
volume_id_get_buffer 327 372 +45
volume_id_open_node 17 24 +7
volume_id_probe_all 133 123 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 52/-10) Total: 42 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I was working with some very small ext4 filesystems, used for
overlaying on immutable VM/container images. If it's only desired to
overlay a single config file, these filesystems can be very small
indeed, and so ran afoul of this length check.
Since 4fc5ec56f ("device matching against UUIDs: do not try
floppies") (from 2009), floppy drives are skipped before this function
is even called. Reading from an unused loop device returns 0, so it
should be fine to reduce the minimum length.
Signed-off-by: Alyssa Ross via busybox <busybox@busybox.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
new_partition 1054 1066 +12
list_table 1366 1370 +4
update_units 32 35 +3
list_disk_geometry 68 71 +3
get_geometry 535 538 +3
fdisk_fatal 38 41 +3
warn_cylinders 42 44 +2
xbsd_print_disklabel 836 834 -2
create_doslabel 110 108 -2
change_units 49 45 -4
xbsd_new_part 477 456 -21
add_partition 1278 1246 -32
.rodata 107059 107008 -51
fdisk_main 4775 4618 -157
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/7 up/down: 30/-269) Total: -239 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
bb_getsize_in_512sect 187 163 -24
.rodata 107088 107059 -29
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-53) Total: -53 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
bb_getsize_in_512sect - 187 +187
list_disk_name_and_sizes - 80 +80
get_geometry 511 535 +24
.rodata 107066 107088 +22
msg_building_new_label 143 142 -1
fdisk_main 4781 4775 -6
list_table 1423 1366 -57
list_disk_geometry 143 68 -75
bb_BLKGETSIZE_sectors 191 - -191
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/4 up/down: 313/-330) Total: -17 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
format_uuid_DCE_37_chars - 94 +94
uuidgen_main 71 53 -18
.rodata 107089 107066 -23
mkswap_main 278 253 -25
volume_id_set_uuid 258 178 -80
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/4 up/down: 94/-146) Total: -52 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
bb_BLKGETSIZE_sectors - 191 +191
fdisk_main 4674 4774 +100
packed_usage 35941 35997 +56
.rodata 107069 107089 +20
get_geometry 665 511 -154
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 367/-154) Total: 213 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
static.copy_inode 613 608 -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5) Total: -5 bytes
text data bss dec hex filename
1087619 827 5088 1093534 10af9e busybox_old
1087654 787 5088 1093529 10af99 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
while at it, deindent nested for()
function old new delta
verify_sun 429 447 +18
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
new_partition 1060 1054 -6
fetch_sun 219 207 -12
verify_sun_cmp 54 39 -15
verify_sun 508 429 -79
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-112) Total: -112 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
verify_sun 481 508 +27
.rodata 107016 107022 +6
verify_sun_cmp 51 54 +3
sun_other_endian 1 - -1
scsi_disk 1 - -1
floppy 1 - -1
xbsd_print_disklabel 838 836 -2
xbsd_new_part 479 477 -2
xbsd_write_bootstrap 397 394 -3
set_sun_partition 103 100 -3
delete_partition 435 432 -3
xbsd_part_index 4 - -4
xbsd_part 4 - -4
verify_sun_starts 4 - -4
part_entry_len 4 - -4
part_array 4 - -4
n_parts 4 - -4
gpt_hdr 4 - -4
check_sun_label 214 208 -6
list_table 1433 1423 -10
fetch_sun 233 219 -14
bsd_select 1564 1546 -18
get_geometry 691 665 -26
get_boot 1539 1513 -26
fdisk_main 4737 4674 -63
------------------------------------------------------------------------------
(add/remove: 0/10 grow/shrink: 3/12 up/down: 36/-207) Total: -171 bytes
text data bss dec hex filename
1078472 555 5088 1084115 108ad3 busybox_old
1078332 555 5056 1083943 108a27 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a simple uuidgen utility that generates RFC 4122 compliant
UUIDs (version 4, random). Uses the existing generate_uuid()
function from libbb and volume_id_set_uuid() for formatting.
Implementation suggested by Ulli.
Features:
- Generates standard format UUIDs: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- RFC 4122 version 4 compliant
- Minimal implementation (~1.1 kb)
- NOFORK applet for efficiency
- Uses existing volume_id infrastructure for UUID formatting
function old new delta
uuidgen_main - 71 +71
applet_names 2862 2870 +8
.rodata 107010 107016 +6
applet_main 1648 1652 +4
applet_suid 103 104 +1
applet_install_loc 206 207 +1
applet_flags 103 104 +1
packed_usage 35952 35941 -11
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 6/1 up/down: 92/-11) Total: 81 bytes
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
lsblk_main 550 869 +319
.rodata 106977 107010 +33
process__sys_block_NAME 461 356 -105
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 352/-105) Total: 247 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
process__sys_block_NAME - 461 +461
lsblk_main 511 550 +39
.rodata 106960 106977 +17
process_SYS_BLOCK_entry 460 - -460
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/0 up/down: 517/-460) Total: 57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a simple lsblk utility that lists information about block devices.
Reads from /sys/block to enumerate devices and displays their size,
type, and mount point.
Features:
- Lists all block devices or specific devices
- Shows device size in human-readable format (B, K, M, G, T, P)
- Shows device type (disk, loop, partition)
- Shows mount point if device is mounted
- Sorts devices alphabetically
- Minimal implementation (~2.5 kb)
Mostly rewritten by vda.linux
function old new delta
lsblk_main - 511 +511
process_SYS_BLOCK_entry - 460 +460
.rodata 106856 106960 +104
read_ull - 81 +81
packed_usage 35924 35952 +28
compare_devices - 25 +25
applet_names 2856 2862 +6
applet_main 1644 1648 +4
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 4/0 up/down: 1219/0) Total: 1219 bytes
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Defends against files like these (python reproducer):
import tarfile
ti = tarfile.TarInfo("leak_hosts")
ti.type = tarfile.LNKTYPE
ti.linkname = "/etc/hosts" # or "../etc/hosts" or ".."
ti.size = 0
with tarfile.open("/tmp/hardlink.tar", "w") as t:
t.addfile(ti)
function old new delta
skip_unsafe_prefix - 127 +127
get_header_tar 1752 1754 +2
.rodata 106861 106856 -5
unzip_main 2715 2706 -9
strip_unsafe_prefix 102 18 -84
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/3 up/down: 129/-98) Total: 31 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
text data bss dec hex filename
3255 0 0 3255 cb7 httpd_indexcgi.o
3253 0 4 3257 cb9 httpd_indexcgi.o.old
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many sites on the Web give those as valid CGI examples -
no "Status:", just "Location:".
function old new delta
cgi_io_loop_and_exit 620 684 +64
log_cgi_status - 49 +49
.rodata 106846 106861 +15
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 128/0) Total: 128 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 56143ea63 (ash: code shrink: eliminate pstrcmp1()) changed
the layout of struct builtincmd so the name member points to the
start of the name, not the flag in the first element of the string.
This broke the help builtin and tab completion of builtins.
Remove the unnecessary '+ 1' in ash_command_name() and helpcmd().
This patch has been submitted upstream.
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| | |
function old new delta
ash_main 1624 1645 +21
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
find_command 961 963 +2
evalcommand 1631 1633 +2
hashcmd 299 300 +1
describe_command 320 321 +1
clearcmdentry 93 94 +1
cdcmd 695 696 +1
pstrcmp1 16 - -16
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 6/0 up/down: 8/-16) Total: -8 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
.rodata 106853 106846 -7
builtintab 352 344 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-15) Total: -15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function old new delta
cmdlookup_pp - 120 +120
find_command 953 961 +8
unsetcmd 74 76 +2
hashcmd 297 299 +2
lastcmdentry 4 - -4
delete_cmd_entry 47 43 -4
cmdlookup 132 - -132
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 3/1 up/down: 132/-140) Total: -8 bytes
text data bss dec hex filename
47470 8 149 47627 ba0b shell/ash.o.orig
47466 8 145 47619 ba03 shell/ash.o
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|