#endif
static int max_print_depth = INT_MAX;
-static int count_hardlinks = INT_MAX;
+static int count_hardlinks = 1;
static int status
#if EXIT_SUCCESS == 0
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))) {
}
if((opt & (1 << 7))) {
/* -l opt */
- count_hardlinks = 1;
+ count_hardlinks = INT_MAX;
}
print_final_total = opt & (1 << 8); /* -c opt */