diff --git a/debian/changelog b/debian/changelog index 4b40e1a0..6c9f3078 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ byobu (5.13) unreleased; urgency=low - simply speed up using perl * usr/bin/byobu: LP: #937175 - check tput for 256 color support before defaulting to that in tmux mode + * usr/lib/byobu/disk_io: LP: #934893 + - initialize the x1 value correctly -- Dustin Kirkland Thu, 16 Feb 2012 23:58:36 -0600 diff --git a/usr/lib/byobu/disk_io b/usr/lib/byobu/disk_io index 464b2eff..838696bd 100755 --- a/usr/lib/byobu/disk_io +++ b/usr/lib/byobu/disk_io @@ -52,16 +52,16 @@ __disk_io() { esac getdisk "$part" local disk=${_RET} - local t2=`date +%s` t1= + local t2=$(date +%s) t1= for i in "read" "write"; do local cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/disk.$i" - t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0 + t1=$(stat -c %Y "$cache") 2>/dev/null || t1=0 local unit="kB/s" - local rate= x1= x2= symbol= unit= + local rate=0 x1=0 x2=0 symbol= unit= if [ $t2 -le $t1 ]; then rate=0 else - [ -r "$cache" ] && read x1 < "$cache" || x1=0 + [ -r "$cache" ] && read x1 < "$cache" local a1= a2= a3= a4= a5= a6= a7= a8= a9= a10= read a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 other < "/sys/block/$disk/stat" if [ "$i" = "read" ]; then