summaryrefslogtreecommitdiff
path: root/net/mrtg
diff options
context:
space:
mode:
Diffstat (limited to 'net/mrtg')
-rw-r--r--net/mrtg/files/sys2mrtg8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mrtg/files/sys2mrtg b/net/mrtg/files/sys2mrtg
index 46776492f56..167e0001965 100644
--- a/net/mrtg/files/sys2mrtg
+++ b/net/mrtg/files/sys2mrtg
@@ -73,11 +73,15 @@ if ($cmd eq irq)
while (<CMDOUT>)
{
chop $_;
- if (m|^(\w+)[\t\s]+(\d+)|)
+ if (m|^(\w+)[\t\s]+(-?\d+)|)
{
+ $val = $2;
+ if ($val < 0) {
+ $val = 0;
+ }
if ($1 eq $irqname)
{
- print "$2\n";
+ print "$val\n";
}
}
}