summaryrefslogtreecommitdiff
path: root/net/mrtg
diff options
context:
space:
mode:
authorbouyer <bouyer>2001-02-08 09:12:58 +0000
committerbouyer <bouyer>2001-02-08 09:12:58 +0000
commite7b9bef915c8eca9d2c7178db76e914e22a990cb (patch)
treeeb9362c89359d6c6baa662a403cb57915940e906 /net/mrtg
parenta4607439d94275897a3b5939a0c0f63a9c497dcf (diff)
downloadpkgsrc-e7b9bef915c8eca9d2c7178db76e914e22a990cb.tar.gz
Print 0 when the number of IRQs has become negative instead of nothing (which
confuses mrtg).
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";
}
}
}