aboutsummaryrefslogtreecommitdiff
path: root/util-linux/lsblk.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* libbb: introduce and use xasprintf_inplace()Denys Vlasenko13 days1-6/+5
| | | | | | | | | | | | | | | 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>
* lkblk: list multiple MOUNTPOINTSDenys Vlasenko2026-01-301-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>
* lsblk: add error messages and exit code when non-blockdevs are givenDenys Vlasenko2026-01-301-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>
* lsblk: new appletOsama Abdelkader2026-01-301-0/+325
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>