X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=coreutils%2Fdu.c;h=a547b1e14c7bff35c1397d02970758ec25e50df7;hb=35a4bbe74f87900dc6014a1871e207709fe40de8;hp=efc4490974d66fea34ea27a7e11bf8cc271c4c67;hpb=e1a0d486e4804eae098571f1a6788394c2ee51ae;p=oweals%2Fbusybox.git diff --git a/coreutils/du.c b/coreutils/du.c index efc449097..a547b1e14 100644 --- a/coreutils/du.c +++ b/coreutils/du.c @@ -27,7 +27,7 @@ #ifdef CONFIG_FEATURE_HUMAN_READABLE # ifdef CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K -static unsigned long disp_hr = KILOBYTE; +static unsigned long disp_hr = 1024; # else static unsigned long disp_hr = 512; # endif @@ -56,14 +56,14 @@ static void print(long size, const char * const filename) { /* TODO - May not want to defer error checking here. */ #ifdef CONFIG_FEATURE_HUMAN_READABLE - bb_printf("%s\t%s\n", make_human_readable_str(size, 512, disp_hr), + printf("%s\t%s\n", make_human_readable_str(size, 512, disp_hr), filename); #else if (disp_k) { size++; size >>= 1; } - bb_printf("%ld\t%s\n", size, filename); + printf("%ld\t%s\n", size, filename); #endif } @@ -180,11 +180,11 @@ int du_main(int argc, char **argv) } if((opt & (1 << 10))) { /* -m opt */ - disp_hr = MEGABYTE; + disp_hr = 1024*1024; } if((opt & (1 << 2))) { /* -k opt */ - disp_hr = KILOBYTE; + disp_hr = 1024; } #else opt_complementary = "H-L:L-H:s-d:d-s"; @@ -246,5 +246,5 @@ int du_main(int argc, char **argv) print(total, "total"); } - bb_fflush_stdout_and_exit(status); + fflush_stdout_and_exit(status); }