Date: Tue, 24 Jun 2014 14:47:00 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191270] df -h output missing units when size is 1TB Message-ID: <bug-191270-8-a2Rps60Zmo@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-191270-8@https.bugs.freebsd.org/bugzilla/> References: <bug-191270-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191270 --- Comment #5 from bycn82@gmail.com --- Created attachment 144102 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144102&action=edit i am describing this patch /* * Divide the number until it fits the given column. * If there will be an overflow by the rounding below, * divide once more. */ for (i = 0; (quotient >= max || (quotient == max - 1 && remainder >= divisordeccut)) && i < maxscale; i++) { remainder = quotient % divisor; quotient /= divisor; } Here to calculate the quotient, (max=1000, devisor=1024,) so when the quotient happently become 999, then "quotient >= max" is false! so it will stop and print it, when quotient is 999, after floor the remainder. it will print 1000 -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191270-8-a2Rps60Zmo>