svn commit: r347314 - head/usr.sbin/mlx5tool

Hans Petter Selasky hselasky at FreeBSD.org
Wed May 8 11:05:31 UTC 2019


Author: hselasky
Date: Wed May  8 11:05:30 2019
New Revision: 347314
URL: https://svnweb.freebsd.org/changeset/base/347314

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

Modified:
  head/usr.sbin/mlx5tool/mlx5tool.c

Modified: head/usr.sbin/mlx5tool/mlx5tool.c
==============================================================================
--- head/usr.sbin/mlx5tool/mlx5tool.c	Wed May  8 11:05:09 2019	(r347313)
+++ head/usr.sbin/mlx5tool/mlx5tool.c	Wed May  8 11:05:30 2019	(r347314)
@@ -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':


More information about the svn-src-head mailing list