From b67e379379ca5be816c7d6d9cdcec99395556733 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 6 Feb 2008 10:29:43 -0800 Subject: rename rate to bandwidth Make qos syntax more familar to IOS users. --- scripts/VyattaQosUtil.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/VyattaQosUtil.pm') diff --git a/scripts/VyattaQosUtil.pm b/scripts/VyattaQosUtil.pm index 0c9ab83..d8a5fa1 100644 --- a/scripts/VyattaQosUtil.pm +++ b/scripts/VyattaQosUtil.pm @@ -47,9 +47,12 @@ sub getRate { die "Rate must be a number followed by a optional suffix (kbit, mbps, ...)\n"; } + } else { + # No suffix implies Kbps just as IOS + $num *= 8000; } - die "Negative rate not allowed\n" if ($num < 0); + ($num >= 0) or die "Negative rate not allowed\n"; return $num; } -- cgit v1.2.3