nuttx-apps/nshlib
dongjiuzhu1 c90b64ed8b nshlib/ls_handler: eliminate floating-point operations for human-readable sizes
Replace floating-point arithmetic with fixed-point integer math to avoid
linking soft-float library (~2-3KB Flash) when displaying human-readable
file sizes (ls -lh command).

Changes:
- Use integer division and modulo to calculate size components
- Calculate decimal part: (remainder * 10) / unit for one decimal place
- Refactor duplicated code: consolidate GB/MB/KB logic into single path
- Remove CONFIG_HAVE_FLOAT dependency

This eliminates calls to __aeabi_f2d, __aeabi_fmul, __aeabi_i2f and other
ARM EABI floating-point helpers, reducing Flash footprint for systems
compiled with -mfloat-abi=soft.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-31 16:32:27 -03:00
..
CMakeLists.txt nshlib/nsh_builtin.c : Add support to run builtin dirrectly as command 2025-09-11 20:00:20 +08:00
Kconfig nshlib/nsh_builtin.c : Add support to run builtin dirrectly as command 2025-09-11 20:00:20 +08:00
Make.defs nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile nshlib/nsh_builtin.c : Add support to run builtin dirrectly as command 2025-09-11 20:00:20 +08:00
nsh.h nshlib/dd: remove nsh dd cmd 2025-04-20 00:41:18 +08:00
nsh_alias.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_altconsole.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_builtin.c nshlib/builtin: check background task before restore the signal 2025-02-12 10:30:05 -03:00
nsh_codeccmd.c nshlib/md5: Support reading from standard input 2025-07-02 10:59:40 -03:00
nsh_command.c nshlib: add -f for umount 2025-12-10 12:16:49 +08:00
nsh_console.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_console.h apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
nsh_consolemain.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_dbgcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_envcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_fileapps.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_fscmds.c nshlib/ls_handler: eliminate floating-point operations for human-readable sizes 2025-12-31 16:32:27 -03:00
nsh_fsutils.c nshlib/nsh_fsutils.c: fix getpid_callback function read size 2025-03-27 09:25:21 +08:00
nsh_init.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_login.c apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
nsh_mmcmds.c apps/nshlib: Reuse local variable for cmd_memdump 2025-01-17 23:27:43 +08:00
nsh_mntcmds.c nshlib: add -f for umount 2025-12-10 12:16:49 +08:00
nsh_modcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_netcmds.c net/ethernet: ARP can be configured on interface 2025-12-25 12:25:02 +08:00
nsh_parse.c nshlib/nsh_parse: Fix "e" flag not take effect 2025-09-18 02:15:49 +08:00
nsh_passwdcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_printf.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_proccmds.c nshlib/nsh_proccmds.c: fix description for TID and switch order 2025-11-07 10:32:42 +08:00
nsh_prompt.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_routecmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_script.c nsh/script: remove double close for output fd 2025-05-14 15:03:35 +08:00
nsh_session.c nsh: return EOF when nread is 0 2025-12-10 11:24:14 +08:00
nsh_syscmds.c nshlib/nsh_syscmds: Fix resetcause and rpmsg_help typos 2025-09-17 10:07:24 +02:00
nsh_system.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_telnetd.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_telnetlogin.c apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
nsh_test.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_timcmds.c nshlib: Replace the big temp buffer with lib_get_[path|temp]buffer 2025-01-20 22:39:35 +08:00
nsh_usbconsole.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_usbtrace.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_vars.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_wait.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
rc.sysinit.template nsh/script: support rc.sysinit script 2022-04-21 12:54:24 +03:00
rcS.template nsh/script: support rc.sysinit script 2022-04-21 12:54:24 +03:00