summaryrefslogtreecommitdiffstats
path: root/lib/libdevstat/devstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libdevstat/devstat.c')
-rw-r--r--lib/libdevstat/devstat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c
index bfc032c..93cb0cb 100644
--- a/lib/libdevstat/devstat.c
+++ b/lib/libdevstat/devstat.c
@@ -1512,6 +1512,8 @@ devstat_compute_statistics(struct devstat *current, struct devstat *previous,
*destld = 0;
*destld /= etime;
*destld *= 100;
+ if (*destld < 0)
+ *destld = 0;
break;
case DSM_QUEUE_LENGTH:
*destu64 = current->start_count - current->end_count;
OpenPOWER on IntegriCloud