--- usr.sbin/iovctl/iovctl.c.orig 2017-09-06 12:53:35.000000000 +0200 +++ usr.sbin/iovctl/iovctl.c 2017-09-06 12:57:33.000000000 +0200 @@ -230,17 +230,21 @@ usage(); } - if (device == NULL && filename == NULL) { + if (device == NULL && filename == NULL && action != CONFIG) { warnx("Either the -d or -f flag must be specified"); usage(); } switch (action) { case CONFIG: - if (filename == NULL) { + if (device != NULL) { warnx("-d flag cannot be used with the -C flag"); usage(); } + if (filename == NULL) { + warnx("The -f flag must be specified"); + usage(); + } config_action(filename, dryrun); break; case DELETE: