byobu icon indicating copy to clipboard operation
byobu copied to clipboard

Fix disk_io notification bug

Open scottjasso opened this issue 3 years ago • 1 comments

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.

scottjasso avatar Jul 10 '21 05:07 scottjasso

Sorry for the github PR instead of launchpad, I just made the code change directly in github UI rather than cloning, etc 😄

scottjasso avatar Jul 10 '21 05:07 scottjasso