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