From 00339087b0ec7ab951eb65b03a2d1d66d97517f0 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 1 Mar 2021 12:10:18 +1100 Subject: Fix integer sizing issues in the DiskIO Meter On Linux kernels the size of the values exported for block device bytes has used a 64 bit integer for quite some time (2.6+ IIRC). Make the procfs value extraction use correct types and change internal types used to rate convert these counters (within the DiskIO Meter) 64 bit integers, where appropriate. --- DiskIOMeter.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'DiskIOMeter.h') diff --git a/DiskIOMeter.h b/DiskIOMeter.h index b2b3e8dd..8b31dfa3 100644 --- a/DiskIOMeter.h +++ b/DiskIOMeter.h @@ -10,9 +10,9 @@ in the source distribution for its full text. #include "Meter.h" typedef struct DiskIOData_ { - unsigned long int totalBytesRead; - unsigned long int totalBytesWritten; - unsigned long int totalMsTimeSpend; + unsigned long long int totalBytesRead; + unsigned long long int totalBytesWritten; + unsigned long long int totalMsTimeSpend; } DiskIOData; extern const MeterClass DiskIOMeter_class; -- cgit v1.2.3