When displaying the size in 1kB blocks round up if an odd number of

blocks
This commit is contained in:
Glenn L McGrath 2004-03-10 09:58:51 +00:00
parent 44c0e17dbe
commit c66ebe4200

View File

@ -77,7 +77,11 @@ static void print(long size, char *filename)
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
}