bb_printf("%s\t%s\n", make_human_readable_str(size, 512, disp_hr),
filename);
#else
- bb_printf("%ld\t%s\n", size >> disp_k, filename);
+ if (disp_k) {
+ size++;
+ size >>= 1;
+ }
+ bb_printf("%ld\t%s\n", size, filename);
#endif
}
#else
disp_k = 0;
#endif
- }
+ }
#endif
/* Note: SUSv3 specifies that -a and -s options can not be used together
* ignore -a. This is consistent with -s being equivalent to -d 0.
*/
#ifdef CONFIG_FEATURE_HUMAN_READABLE
- bb_opt_complementaly = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s";
+ bb_opt_complementally = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s";
opt = bb_getopt_ulflags(argc, argv, "aHkLsx" "d:" "lc" "hm", &smax_print_depth);
if((opt & (1 << 9))) {
/* -h opt */
disp_hr = KILOBYTE;
}
#else
- bb_opt_complementaly = "H-L:L-H:s-d:d-s";
+ bb_opt_complementally = "H-L:L-H:s-d:d-s";
opt = bb_getopt_ulflags(argc, argv, "aHkLsx" "d:" "lc", &smax_print_depth);
#if !defined CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K
if((opt & (1 << 2))) {