Date: Tue, 12 Sep 2017 21:12:04 +0000 (UTC) From: Ryan Stone <rstone@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323506 - head/usr.sbin/iovctl Message-ID: <201709122112.v8CLC4qA030434@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rstone Date: Tue Sep 12 21:12:04 2017 New Revision: 323506 URL: https://svnweb.freebsd.org/changeset/base/323506 Log: Fix incorrect error message in iovctl If the iovctl command was invoked with only the -C flag, the user would receive a message claiming that they needed to also supply either the -d flag or the -f flag. However, in the case of the -C mode, only the -f flag is acceptable. Correct this error message in this case. PR: 222050 Submitted by: Heinz N. Gies Reported by: Heinz N. Gies MFC after: 1 week Modified: head/usr.sbin/iovctl/iovctl.c Modified: head/usr.sbin/iovctl/iovctl.c ============================================================================== --- head/usr.sbin/iovctl/iovctl.c Tue Sep 12 21:08:50 2017 (r323505) +++ head/usr.sbin/iovctl/iovctl.c Tue Sep 12 21:12:04 2017 (r323506) @@ -230,15 +230,19 @@ main(int argc, char **argv) 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709122112.v8CLC4qA030434>