From 5969ef3c8c81cbc327e7d1e74ede3c4b64df7133 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 25 Sep 2019 07:51:30 +0000 Subject: [PATCH] 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. --- sbin/nvmecontrol/perftest.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sbin/nvmecontrol/perftest.c b/sbin/nvmecontrol/perftest.c index 74a4bd18f75f..cc3beece5534 100644 --- a/sbin/nvmecontrol/perftest.c +++ b/sbin/nvmecontrol/perftest.c @@ -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)