mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
usr/lib/byobu/mem_used: use fpdiv to round free memory properly
This commit is contained in:
parent
b791342142
commit
cf85b55ddc
2 changed files with 2 additions and 2 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue