aboutsummaryrefslogtreecommitdiff
path: root/docs/cgi (unfollow)
Commit message (Collapse)AuthorFilesLines
6 daysUpdate default configurations; include uuid functionsRon Yorston6-7/+23
7 daysash: fix help builtin and tab completion of builtinsRon Yorston1-0/+8
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.
8 daysmain: !CONFIG_BUSYBOX: "busybox --OPT" is not a call to applet "-OPT"busyboxDenys Vlasenko1-1/+4
This was confusing: $ busybox --help -help: applet not found Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
8 days*: whitespace cleanupDenys Vlasenko7-8/+0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
8 daystls: document PSTM_64BIT + PSTM_X86_64 optimizations betterDenys Vlasenko2-11/+11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
9 daysvi: code shrinkDenys Vlasenko1-7/+9
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>
9 daysvi: fix last commit - do terminate the :CMD on the first whitespaceDenys Vlasenko1-0/+1
function old new delta colon 3942 3952 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
9 days*: use is_prefixed_with() where appropriateDenys Vlasenko4-4/+4
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>
9 daysvi: fix ":list" commandDenys Vlasenko1-32/+30
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>
9 daysvi: code shrinkDenys Vlasenko1-15/+17
function old new delta colon 4005 3989 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
9 daysvi: fix "s /find/repl" with whitespace before /Denys Vlasenko2-11/+14
function old new delta colon 3977 4005 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
9 daysvi: code shrink, optimize: do not call count_lines() unless neededDenys Vlasenko1-73/+61
function old new delta colon 4010 3980 -30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
10 days*: use xasprintf_inplace() and concat_path_file() where appropriateDenys Vlasenko7-16/+13
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>
10 days*: use xasprintf_inplace() in more placesDenys Vlasenko3-18/+17
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>
11 daysman: fix following links if run inside manpage dirDenys Vlasenko1-16/+28
function old new delta run_man_pipe 369 420 +51 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
11 dayslibbb: introduce and use xasprintf_inplace()Denys Vlasenko9-34/+48
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>
11 dayswatch: implement -xDenys Vlasenko1-7/+20
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>
12 dayslibbb: use narrow isqrt() when 64-bit one is not needed (only "factor" uses it)Denys Vlasenko3-5/+62
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>
12 daysvolume_id: improve handling of too-small (usually zero-byte or erroring) ↵Denys Vlasenko3-18/+52
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>
12 daysvolume_id: volume_id_get_buffer with small FSesAlyssa Ross via busybox1-3/+2
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>
12 daysfdisk: code shrinkDenys Vlasenko5-127/+75
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>
12 daysfdisk: comment out "not a multiple of 512 bytes" warningDenys Vlasenko1-5/+6
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>
12 daysfdisk: several fixes for 4K sector sizeDenys Vlasenko7-123/+133
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>
13 daysfindfs: tweak --helpDenys Vlasenko1-2/+2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 daysuuidgen: move UUID formatting to libbbDenys Vlasenko6-26/+27
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>
14 dayswin32: add support for /dev/std{in,out,err}Ron Yorston2-5/+18
Allow applets to open the "files" /dev/stdin, /dev/stdout and /dev/stderr. The 'stat' and 'ls' applets pretend they exist. Adds 48-56 bytes.
14 daysfdisk: uncomment -s supportDenys Vlasenko1-48/+48
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>
14 daysdevfsd: constify, code shrinkDenys Vlasenko1-4/+4
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>
2026-02-02fdisk_sgi: formatting fixesDenys Vlasenko1-11/+11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2026-02-01fdisk: fix spurious warning about zero unused sectorsDenys Vlasenko1-30/+34
while at it, deindent nested for() function old new delta verify_sun 429 447 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2026-02-01fdisk: simplify start/len calcualtions for Sun labelsDenys Vlasenko2-62/+61
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>
2026-02-01fdisk: eliminate static variables, fix GPT disk size (32x32->32 overflow)Denys Vlasenko4-89/+116
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>
2026-02-01util-linux: add minimal uuidgen implementationOsama Abdelkader via busybox2-3/+60
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>
2026-02-01libbb: fix regression where 'which' output duplicate slashesRon Yorston1-0/+8
If an element of $PATH had a trailing slash 'which' displayed two slashes when an executable was found in that directory. This is a regression caused by upstream commit 49d9e06fb (libbb: modify find_executable() to not temporarily write to PATH). Prior to this commit find_executable() used concat_path_file() to build the path of the executable. This avoids including duplicate slashes in its output. The new code didn't. Add a test in find_executable() to detect the problem. It still fails if there are multiple trailing slashes. Don't do that. Adds 48 bytes.
2026-01-30lkblk: list multiple MOUNTPOINTSDenys Vlasenko1-22/+58
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>
2026-01-30lsblk: add error messages and exit code when non-blockdevs are givenDenys Vlasenko1-17/+39
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>