From nobody Tue Jan 18 21:13:39 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 E14B719647DB; Tue, 18 Jan 2022 21:13:39 +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 4JdhMl3mYYz3pWd; Tue, 18 Jan 2022 21:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642540419; 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=eWSJMyjGzAWVXyBomD2DOw1u57f/QeHZnnqPHDzzEtQ=; b=PNGuUzVv4sXenai3AYdMVY94CeDXfNGD2CaeV5M/c/x89QYC6F2CFtubcerz6wMGcvBVT6 yVawwu0Rj3BF5vAYOPtP5l23MLVDa51XktYbgWxjPdjqljggLc5MFMIFHyyvxhih01kuop dOrIBnSSQzmyjyFnrCr38X2fnj1lORS+9Th+McAU7KhVi2Mxm4LGXhztSFoxCI+KPLhJc0 kg056taFP6B24X5vWwOgyFo6xrSibhvC5qxOPye3Yuwbv7qd/+EERfsXir8iDEy/hW0Ysj 31qOxcyseNm1fp1cgPxeixkgNHHoCc6hlUfe9EyNkQ/hsYkeLgj5/9264OcPgA== 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 5180E559; Tue, 18 Jan 2022 21:13:39 +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 20ILDdgL035257; Tue, 18 Jan 2022 21:13:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20ILDdfM035256; Tue, 18 Jan 2022 21:13:39 GMT (envelope-from git) Date: Tue, 18 Jan 2022 21:13:39 GMT Message-Id: <202201182113.20ILDdfM035256@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: 313f267bb0df - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 313f267bb0df789d28eb29f7eff15e217b114f84 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642540419; 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=eWSJMyjGzAWVXyBomD2DOw1u57f/QeHZnnqPHDzzEtQ=; b=LKZ9vP9BjWiJLstJFVST57KlX8OFl34hJWm8fNJqmR2p4AaTjYV1SaZvp5WjqzrQuv+bum simGtp44vQWDqRpdHcbIW5GaQpNlyv46F/B7xTUovbTsITWP3iqBt6jbQVK+dvPUMWZ0+b e77QiZbWNgedCzkpuxlA+TkxaAc6+0iNUXPp7RTzPqXO91ivZpZFEc/6I8W8H+z4jUWzAQ GUpBOM8BaMAbZDhWRKt1nynh5zvdooLaKNHOS2hGk+4N/VUPH/PQuz/PnDpkFyN4J6+D/y ZjxGM7pFNu88o5O6+Ac5xJv6Z2K/3Kf69IQOkXYe9UWeB5Nf8JZkZbSfWzCe1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642540419; a=rsa-sha256; cv=none; b=lBmLC4ACFkxP3JHOm6SVdESfKd9o4o5NhqKJ8BnN0GF2PQeL3voEBxEfY726ikWLUsyAB4 MStlPvEYfRF/JfOQJb088AWpvzS06I2tyDYa7g92snunJDyUMrijCjv7w6769DJi+Oydm5 la3dSkZSVg7dRyf/x76evpg0ineTlFL8UfSG7tZL7thQ0TMzRq79hdCsMTMSKdI9Dy1GPd B3/g01W6d40dKf/aBQt7UefUOHUSkuZowYkDKDzMm3YB44+EuSe0lsnOWtqlhsYxZlzHqE E+ObE3ngXyN6z+/aLH5f+EmGsCZWUPJov9ZyA5XAqewLX6ddqhPDBAgqdoESPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by joerg: URL: https://cgit.FreeBSD.org/src/commit/?id=313f267bb0df789d28eb29f7eff15e217b114f84 commit 313f267bb0df789d28eb29f7eff15e217b114f84 Author: Joerg Wunsch AuthorDate: 2021-12-20 09:17:57 +0000 Commit: Joerg Wunsch CommitDate: 2022-01-18 21:12:35 +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 (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':