Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2020 20:40:04 +0000 (UTC)
From:      Alexander Motin <mav@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: r366859 - stable/12/sbin/nvmecontrol
Message-ID:  <202010192040.09JKe4MC079594@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Oct 19 20:40:03 2020
New Revision: 366859
URL: https://svnweb.freebsd.org/changeset/base/366859

Log:
  MFC r352671 (by imp): Size is unsigned, so remove the test entirely.
  
  The kernel won't crash if you have a bad value and I'd rather not have
  nvmecontrol know the internal details about how the nvme driver limits
  the transfer size.

Modified:
  stable/12/sbin/nvmecontrol/perftest.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/nvmecontrol/perftest.c
==============================================================================
--- stable/12/sbin/nvmecontrol/perftest.c	Mon Oct 19 20:39:00 2020	(r366858)
+++ stable/12/sbin/nvmecontrol/perftest.c	Mon Oct 19 20:40:03 2020	(r366859)
@@ -177,10 +177,6 @@ perftest(const struct cmd *f, int argc, char *argv[])
 		arg_help(argc, argv, f);
 	}
 	io_test.time = opt.time;
-	if (opt.size < 0) {
-		fprintf(stderr, "Invalid size.\n");
-		arg_help(argc, argv, f);
-	}
 	io_test.size = opt.size;
 	open_dev(opt.dev, &fd, 1, 1);
 	if (ioctl(fd, ioctl_cmd, &io_test) < 0)



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