Date: Wed, 25 Sep 2019 07:51:30 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352671 - head/sbin/nvmecontrol Message-ID: <201909250751.x8P7pUqm020805@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Sep 25 07:51:30 2019 New Revision: 352671 URL: https://svnweb.freebsd.org/changeset/base/352671 Log: 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: head/sbin/nvmecontrol/perftest.c Modified: head/sbin/nvmecontrol/perftest.c ============================================================================== --- head/sbin/nvmecontrol/perftest.c Wed Sep 25 07:36:35 2019 (r352670) +++ head/sbin/nvmecontrol/perftest.c Wed Sep 25 07:51:30 2019 (r352671) @@ -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?201909250751.x8P7pUqm020805>