Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 16:37:00 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r347779 - stable/12/usr.sbin/mlx5tool
Message-ID:  <201905161637.x4GGb0tW076603@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu May 16 16:37:00 2019
New Revision: 347779
URL: https://svnweb.freebsd.org/changeset/base/347779

Log:
  MFC r347314:
  Ensure that only one command is specified at a time in mlx5tool(8).
  
  Submitted by:	kib@
  Sponsored by:	Mellanox Technologies

Modified:
  stable/12/usr.sbin/mlx5tool/mlx5tool.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/mlx5tool/mlx5tool.c
==============================================================================
--- stable/12/usr.sbin/mlx5tool/mlx5tool.c	Thu May 16 16:36:10 2019	(r347778)
+++ stable/12/usr.sbin/mlx5tool/mlx5tool.c	Thu May 16 16:37:00 2019	(r347779)
@@ -244,22 +244,32 @@ main(int argc, char *argv[])
 			addrstr = optarg;
 			break;
 		case 'w':
+			if (act != ACTION_NONE)
+				usage();
 			act = ACTION_DUMP_GET;
 			break;
 		case 'e':
+			if (act != ACTION_NONE)
+				usage();
 			act = ACTION_DUMP_FORCE;
 			break;
 		case 'o':
 			dumpname = optarg;
 			break;
 		case 'r':
+			if (act != ACTION_NONE)
+				usage();
 			act = ACTION_DUMP_RESET;
 			break;
 		case 'f':
+			if (act != ACTION_NONE)
+				usage();
 			act = ACTION_FW_UPDATE;
 			img_fw_path = optarg;
 			break;
 		case 'z':
+			if (act != ACTION_NONE)
+				usage();
 			act = ACTION_FW_RESET;
 			break;
 		case 'h':



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