Bug 222050 - iovctl help message contradicting itself
Summary: iovctl help message contradicting itself
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Ryan Stone
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-09-04 14:48 UTC by Heinz N. Gies
Modified: 2021-08-20 21:48 UTC (History)
3 users (show)

See Also:


Attachments
a patch to fix the incorrect output (667 bytes, patch)
2017-09-06 17:44 UTC, Heinz N. Gies
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Heinz N. Gies 2017-09-04 14:48:21 UTC
iovctl prints contradicting help messages:

root@thunderx:/zones # iovctl -C
iovctl: Either the -d or -f flag must be specified
iovctl: Usage: iovctl -C -f <config file> [-n]
iovctl:        iovctl -D [-d <PF device> | -f <config file>] [-n]
iovctl:        iovctl -S [-d <PF device> | -f <config file>]

running it with -C says it needs the -d flag, then running it with -d says -C can't run with -d

root@thunderx:/zones # iovctl -C -d /dev/iov/vnicpf0
iovctl: -d flag cannot be used with the -C flag
iovctl: Usage: iovctl -C -f <config file> [-n]
iovctl:        iovctl -D [-d <PF device> | -f <config file>] [-n]
iovctl:        iovctl -S [-d <PF device> | -f <config file>]
Comment 1 Heinz N. Gies 2017-09-06 17:44:25 UTC
Created attachment 186122 [details]
a patch to fix the incorrect output

This patch changes the output logic slightly and prints the correct message if iovctl -C is entered.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-09-12 21:13:06 UTC
A commit references this bug:

Author: rstone
Date: Tue Sep 12 21:12:04 UTC 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

Changes:
  head/usr.sbin/iovctl/iovctl.c
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-23 10:27:40 UTC
batch change of PRs untouched in 2018 marked "in progress" back to open.
Comment 4 Piotr Pawel Stefaniak freebsd_committer freebsd_triage 2021-08-20 17:39:11 UTC
Hi Ryan, do we need to do anything else to close this PR?