usr/lib/byobu/mem_used: use fpdiv to round free memory properly

This commit is contained in:
Scott Moser 2011-05-25 15:01:34 -04:00
commit cf85b55ddc
2 changed files with 2 additions and 2 deletions

1
debian/changelog vendored
View file

@ -7,6 +7,7 @@ byobu (4.3) unreleased; urgency=low
[ Scott Moser ]
* usr/lib/byobu/.shutil: fix rounding across a decimal point in fpdiv()
* usr/lib/byobu/swap: update to address fix in fpdiv
* usr/lib/byobu/mem_used: use fpdiv to round free memory properly
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 23 May 2011 19:21:36 -0500

View file

@ -51,8 +51,7 @@ meminfo_used() {
fo_buffers=$(($kb_main_used - $buffers_plus_cached))
fo_cached=$(($kb_main_free + $buffers_plus_cached))
#fpdiv $((100*${fo_buffers})) "${total}" 0; _RET=${_RET%.}; return
_RET=$(((100*${fo_buffers}) / ${total}))
fpdiv $((100*${fo_buffers})) "${total}" 0;
}
if [ -r /proc/meminfo ]; then