From nobody Mon Dec 20 11:49:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 768961903D90; Mon, 20 Dec 2021 11:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JHdDd0R2Fz4g9C; Mon, 20 Dec 2021 11:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5F4915B54; Mon, 20 Dec 2021 11:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BKBnqlk055783; Mon, 20 Dec 2021 11:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BKBnqpq055782; Mon, 20 Dec 2021 11:49:52 GMT (envelope-from git) Date: Mon, 20 Dec 2021 11:49:52 GMT Message-Id: <202112201149.1BKBnqpq055782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joerg Wunsch Subject: git: cae1884d4791 - main - usbconfig: documentation fixes, mainly for -i option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: joerg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cae1884d4791726f5acf5d64bba9a3583b63e38b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640000993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=01vdaEGvdMKyLUGLSv6IBDghrGin3ewgegkYs1cMA78=; b=wdp4gWk3EFR+mhUe2VF/dcK6oO6NdKsiPpW+Gc30K0ecqFWSHX7+XgprzKWEof4VyMDuWk MiWiwzhnwq7VoraCpsEDZDBxmFb32jcbR8fzmMDMdPdkt4J97NiBOkCO8hb00/TLsJ3f93 RTLLMVm8m03CmVH6J3xhVXhhYe85uORT96q2qnPuTqlycmH+aFDloOYHjZJ4Y+tZ7BWtzd O23ZxnrGeryxMzkSOn4IbBKsgVo1dpjfou5Tb9uYNkfIOW5QUeieW0DCEnGR+wBhAqcJ1d c3gOUq9tnrXBqSLwvecjBIoVIU0O1yU9bF1ddIRM0Gq5p2HdAUPMSdcAD9LPww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640000993; a=rsa-sha256; cv=none; b=h7wXuaYaKUrUeBPgr213vxpsE5yMc9P5bEbgdAYx2Ms1X7eWgR0k/Z5fb+SAZIv+n+L6YW wxJDYdkAS7e7Syf8If7JQ2DXXlSgWpYprzbW8RddF/XZjqar//8driGU458dp9L+kMFNzb M40QnZKxx3HApWIWjGGXmmfCPqrlSlnavoB+HwM8uhPJM8Wn6b2Nw1LvLhiQ3du/MXmGxA LC4KZEwg0+fUy3sKWWEIOXDiNEKnQ/L6Ev1meAoxa+uZ66ZE7shujg0hOmiJE4jq4DZXK/ 1wf3YOYRKOiHRYn5xumD0n83RcMZGpW6U62omgWNmcsFQJsx8lQByrs6x5wJEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by joerg: URL: https://cgit.FreeBSD.org/src/commit/?id=cae1884d4791726f5acf5d64bba9a3583b63e38b commit cae1884d4791726f5acf5d64bba9a3583b63e38b Author: Joerg Wunsch AuthorDate: 2021-12-20 09:17:57 +0000 Commit: Joerg Wunsch CommitDate: 2021-12-20 11:49:31 +0000 usbconfig: documentation fixes, mainly for -i option * in usage(), clearly mark -i interface as optional * both, -u busnum and -a devaddr are optional as well * various minor man page fixes * clearly mark those two commands that actually use -i ifaceidx * remove unused bitfield tag got_iface * fix indentation level according to review comment Differential Revision: https://reviews.freebsd.org/D33579/ Reviewed by: hselasky MFC after: 2 weeks --- usr.sbin/usbconfig/usbconfig.8 | 14 +++++++++++--- usr.sbin/usbconfig/usbconfig.c | 8 +++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/usr.sbin/usbconfig/usbconfig.8 b/usr.sbin/usbconfig/usbconfig.8 index ecfd0246eaac..dd6264451cf7 100644 --- a/usr.sbin/usbconfig/usbconfig.8 +++ b/usr.sbin/usbconfig/usbconfig.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 27, 2019 +.Dd December 20, 2021 .Dt USBCONFIG 8 .Os .Sh NAME @@ -33,9 +33,11 @@ .Nm .Op Fl u Ar unit .Op Fl a Ar addr +.Op Fl i Ar interface_index .Op cmds... .Nm -.Op Oo Fl d Oc Ar [ugen]. +.Fl d Ar [[/dev/]ugen]. +.Op Fl i Ar interface_index .Op cmds... .Sh DESCRIPTION The @@ -49,7 +51,7 @@ Limit device range to USB devices connected to the given USBUS unit. .It Fl a Ar addr Limit device range to the given USB device index. Should only be used in conjunction with the unit argument. -.It Fl d Ar [ugen]. +.It Fl d Ar [[/dev/]ugen]. Limit device range to USB devices connected to the given unit and address. The unit and address coordinates may be prefixed by the lowercased word "ugen", or the full path name @@ -83,6 +85,9 @@ in .Cm dump_curr_config_desc output. Usually there is no need to adjust this setting. +This command uses the +.Fl i Ar interface_index +option. .It Cm set_template Ar template Set the global USB device side template. See @@ -128,6 +133,9 @@ or currently attached to the device. .It Cm detach_kernel_driver Detach kernel driver for the selected interface and USB device. +This command uses the +.Fl i Ar interface_index +option. .It Cm suspend Force the device to suspend. .It Cm resume diff --git a/usr.sbin/usbconfig/usbconfig.c b/usr.sbin/usbconfig/usbconfig.c index a19ff8039186..986aa6cd8f7b 100644 --- a/usr.sbin/usbconfig/usbconfig.c +++ b/usr.sbin/usbconfig/usbconfig.c @@ -65,7 +65,6 @@ struct options { uint8_t got_list:1; uint8_t got_bus:1; uint8_t got_addr:1; - uint8_t got_iface:1; uint8_t got_set_config:1; uint8_t got_set_alt:1; uint8_t got_set_template:1; @@ -272,8 +271,8 @@ usage(void) { fprintf(stderr, "" "usbconfig - configure the USB subsystem" "\n" - "usage: usbconfig -u -a -i [cmds...]" "\n" - "usage: usbconfig -d [ugen]. -i [cmds...]" "\n" + "usage: usbconfig [-u ] [-a ] [-i ] [cmds...]" "\n" + "usage: usbconfig -d [ugen]. [-i ] [cmds...]" "\n" "commands:" "\n" " set_config " "\n" " set_alt " "\n" @@ -576,7 +575,7 @@ main(int argc, char **argv) if (strncmp(optarg, "ugen", strlen("ugen")) == 0) { ptr = optarg + strlen("ugen"); } else if (strncmp(optarg, "/dev/ugen", - strlen("/dev/ugen")) == 0) { + strlen("/dev/ugen")) == 0) { ptr = optarg + strlen("/dev/ugen"); } else { ptr = optarg; @@ -596,7 +595,6 @@ main(int argc, char **argv) case 'i': opt->iface = num_id(optarg, "iface"); - opt->got_iface = 1; break; case 'u':