| Summary: | ls-s-works fails due to missing "total" in ls -s | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Basil Nutmeg <basil+busybox> |
| Component: | Networking | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
Fixed in git: commit fca0ee5959f212e46b9a5bb324a1482899172750 Author: Denys Vlasenko <vda.linux@googlemail.com> Date: Thu Feb 27 15:40:26 2014 +0100 ls: make "ls -s DIR" show total too |
Test ls-s-works fails because GNU "ls -s" prints a "total" line, while busybox "ls -s" does not. For example: $ ./busybox ls -s applets_sh 4 README 4 dos2unix 4 nologin 4 tac 4 unix2dos $ ls -s applets_sh total 20 4 dos2unix 4 nologin 4 README 4 tac 4 unix2dos Busybox ls already has code for printing a total, however it is only enabled in "ls -l", not "ls -s". This code is in function scan_and_display_dirs_recur, where it calls calculate_blocks and prints the result. It should be enabled when the LIST_BLOCKS option (-s) is active also.