diff options
author | Luiz Otavio O Souza <loos@FreeBSD.org> | 2013-07-23 13:40:26 +0000 |
---|---|---|
committer | Luiz Otavio O Souza <loos@FreeBSD.org> | 2013-07-23 13:40:26 +0000 |
commit | da2a0dcb7a4b9f8ab1b1b94d02799204b8d28e81 (patch) | |
tree | 9f144f05d716ec38ba15dce264e0e38f2849fd6d /sbin | |
parent | 9c99f4d7e74cdb30199bf7f9abff3d3eafbbd998 (diff) | |
download | src-da2a0dcb7a4b9f8ab1b1b94d02799204b8d28e81.tar.gz src-da2a0dcb7a4b9f8ab1b1b94d02799204b8d28e81.zip |
Fix the usage error message. The valid range is up to max. vlan - 1 since vlangroups starts at 0.
Approved by: adrian (mentor)
Notes
Notes:
svn path=/head/; revision=253568
Diffstat (limited to 'sbin')
-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 e11758050df3..a67dac04c185 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); |