diff options
author | loos <loos@FreeBSD.org> | 2013-07-23 13:40:26 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2013-07-23 13:40:26 +0000 |
commit | 88d161491f8f0902491f8df563668a7f3524d4f7 (patch) | |
tree | 9f144f05d716ec38ba15dce264e0e38f2849fd6d /sbin/etherswitchcfg | |
parent | 6d513d7d464f04de82d6e1d90c2934722065faee (diff) | |
download | FreeBSD-src-88d161491f8f0902491f8df563668a7f3524d4f7.zip FreeBSD-src-88d161491f8f0902491f8df563668a7f3524d4f7.tar.gz |
Fix the usage error message. The valid range is up to max. vlan - 1 since vlangroups starts at 0.
Approved by: adrian (mentor)
Diffstat (limited to 'sbin/etherswitchcfg')
-rw-r--r-- | sbin/etherswitchcfg/etherswitchcfg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/etherswitchcfg/etherswitchcfg.c b/sbin/etherswitchcfg/etherswitchcfg.c index e117580..a67dac0 100644 --- a/sbin/etherswitchcfg/etherswitchcfg.c +++ b/sbin/etherswitchcfg/etherswitchcfg.c @@ -626,7 +626,9 @@ main(int argc, char *argv[]) newmode(&cfg, MODE_PORT); } else if (sscanf(argv[0], "vlangroup%d", &cfg.unit) == 1) { if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nvlangroups) - errx(EX_USAGE, "port unit must be between 0 and %d", cfg.info.es_nvlangroups); + errx(EX_USAGE, + "vlangroup unit must be between 0 and %d", + cfg.info.es_nvlangroups - 1); newmode(&cfg, MODE_VLANGROUP); } else if (strcmp(argv[0], "config") == 0) { newmode(&cfg, MODE_CONFIG); |