Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2013 13:40:27 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253568 - head/sbin/etherswitchcfg
Message-ID:  <201307231340.r6NDeRHu024191@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loos
Date: Tue Jul 23 13:40:26 2013
New Revision: 253568
URL: http://svnweb.freebsd.org/changeset/base/253568

Log:
  Fix the usage error message.  The valid range is up to max. vlan - 1 since vlangroups starts at 0.
  
  Approved by:	adrian (mentor)

Modified:
  head/sbin/etherswitchcfg/etherswitchcfg.c

Modified: head/sbin/etherswitchcfg/etherswitchcfg.c
==============================================================================
--- head/sbin/etherswitchcfg/etherswitchcfg.c	Tue Jul 23 12:22:37 2013	(r253567)
+++ head/sbin/etherswitchcfg/etherswitchcfg.c	Tue Jul 23 13:40:26 2013	(r253568)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307231340.r6NDeRHu024191>