From nobody Tue Jan 18 21:15:40 2022 X-Original-To: dev-commits-src-branches@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 31E701965655; Tue, 18 Jan 2022 21:15:41 +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 4JdhQ46hKrz3qnm; Tue, 18 Jan 2022 21:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642540541; 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=48mDtAx46wF2B0/SebD6ktPs7ac+SCaVpKeh5NpCFtI=; b=KVLqMAm+jrGboy4lcc83X1bwMY0gf2WUp+QN2JO8p/4VU2Jx84coFgS528GOvRW0TjjIe0 uizR7fs5ZG1JS3cuEegfZ4vxRY7ACjgRmbeQntcDYNMvV7R9t122S74GekVuJwa93LQU21 KTkaMKcHaODVEzq9YiPiZIIqEQgCkMXrSqIkudatMMup1syykU7uyyyOsKir931DiCJcl2 KJJ3vxGZWiwKw76ZvCT6HF9Btp0gF60QRYRsUoH6mGho/QvmyIiaFsYaApOa++0cKxO8G+ 2fCz1XGVnQ8sA4+MPV8S5nhurrhIx4Tj8KU+JQJBKi2DWmsvj1KrODL39ocqGg== 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 B3057904; Tue, 18 Jan 2022 21:15:40 +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 20ILFe8X035614; Tue, 18 Jan 2022 21:15:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20ILFe3j035613; Tue, 18 Jan 2022 21:15:40 GMT (envelope-from git) Date: Tue, 18 Jan 2022 21:15:40 GMT Message-Id: <202201182115.20ILFe3j035613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joerg Wunsch Subject: git: 940db7edacb2 - stable/12 - usbconfig: documentation fixes, mainly for -i option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/12 X-Git-Reftype: branch X-Git-Commit: 940db7edacb21a513924472f6cf4eec6a5e75090 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642540541; 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=48mDtAx46wF2B0/SebD6ktPs7ac+SCaVpKeh5NpCFtI=; b=ZS+psMnxk6MkdbW1JxTauxhe24+OXriLWKDEyHv1Pf5zyQztktPKPHm7DA/pv3Nlt2Bos0 zQz4kuOWhLAvcBI21+GWbeps2Haw7JuQg/UgBDcQd/6NQQRIqC9XWxYLC7nIlHmJiQ+P9m YfxA3rMFGUuj1kp+fhbltmmTqIUQwZbAWyzVAlVXhr6MSRfc+eNdcls/1U6wLDgz3Lj1hW PoAQS2Ol8qnz82lAaRuSfqsxL6UuZtfRRz7Xsn0/kDKJItWHOGLhh0Dv9dnx1ZIQsMx7dO v/PJzuNUCloV3x4VHOq5MaIflGXrJY7Op5zMTPgaavYC60RsRhvEY1JHp1ZDVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642540541; a=rsa-sha256; cv=none; b=IfKnPWUPnhqFvMS66TDbeB0fJ1DRmPoOz9VZGEnzWXDbhV72P8hsMHKDulT9AnIM6285cU fivWwQcZt63vvgyBgP+c/Z4+dHHii7zGbrng5xlgI3kjv6583ygELujNfy7W+EvlH4mBiV ZzLZVicNDdL3ChN+M3OUI0RNY6XMFcDFZqWZwO3zd2XqQB/eWjjDoCGxNZ6+yaoU6BWjbv sBQZUFomMcGuWGJaonYR6fJC+J4ruEnd4K7CaZbmqBHO0kHS4pmgUvpjYwz5lw/K8b4X0p Y9xZungxHVF0YxC2UDcq8JJ69/oxJoBy30zo4D2oNOaXDLPsh64QR4TNjLqEfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by joerg: URL: https://cgit.FreeBSD.org/src/commit/?id=940db7edacb21a513924472f6cf4eec6a5e75090 commit 940db7edacb21a513924472f6cf4eec6a5e75090 Author: Joerg Wunsch AuthorDate: 2021-12-20 09:17:57 +0000 Commit: Joerg Wunsch CommitDate: 2022-01-18 21:14:58 +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 (cherry picked from commit cae1884d4791726f5acf5d64bba9a3583b63e38b) --- 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':