byobu
byobu copied to clipboard
Fix disk_io notification bug
This fixes a bug that makes disk_io stats incorrect and forever increasing, due to the "baseline" stats always being 0.
This commit intended to catch read failures, but actually just always sets x1 to 0. This is because "read" returns 1 if no newline is read, and the code doesn't write a newline to $cache.
Instead, this just always trusts that read works, as x1 is set even if there's no newline. A more robust way might be via cat.
Sorry for the github PR instead of launchpad, I just made the code change directly in github UI rather than cloning, etc 😄