From nobody Sat Jan 29 21:18:02 2022 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 559251995E9D; Sat, 29 Jan 2022 21:18:03 +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 4JmRxl207tz4XK4; Sat, 29 Jan 2022 21:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643491083; 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=ChANHKXZh3fJ45x6cM3fijjS35Xb0Owqa2myu9lqvqo=; b=s8wLxaQv/itTQ6snKCsA4xMBHs+KZEZNKmExN/eUFjRwhwScSFFFiCRBuEQs1nI5ph2pdW ofurKdu72GDNLi9vVXC8EtAhksPkdkBc7byqOkl9AzlGX0KT0V+teq0YUSnCybEn85D9SG eVix54h8krM1l3Onkl/e4qmh64OzHpm3KTEJGJRipLKL5jWOe+1UUMQTziE2dla1ex8tk0 6qtxYcyd3kd7qV6eeAroRobGIaLm1XYKHEgB1dfbUs9zaUcxVKPTnrhvugXP2D6Pe+vEZb jLKEL3qGs84qXm7LdxciS14YWSqutyJRzX1akLcV0PUJ1G/jqiO2l3KejiLzLw== 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 1FC9E1C3F1; Sat, 29 Jan 2022 21:18:03 +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 20TLI24D046980; Sat, 29 Jan 2022 21:18:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20TLI2fH046979; Sat, 29 Jan 2022 21:18:02 GMT (envelope-from git) Date: Sat, 29 Jan 2022 21:18:02 GMT Message-Id: <202201292118.20TLI2fH046979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 5eafaf9e6889 - main - usbconfig.8: Improve style and fix examples 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5eafaf9e68894cda4e8dca5f363be0b4f15b5cd6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643491083; 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=ChANHKXZh3fJ45x6cM3fijjS35Xb0Owqa2myu9lqvqo=; b=ktLyE+CltHVbGDmO8dcGQpgC6Til6vUyxrNrG6OKsyG55DKmdpYBiZYmVMhjkx7Zv/Vepo m9Pj8aFcSmfs8cd/h6mfqaGVhMQAbMCM68N3ONzNkfEsVWiHZe4bEitko3cfIZntA4wUpG jm4N/yTZ52Jk/cZcfqD8UsMF61r40QKRCBcS/g4esaH3nLA8wl7khGznjaOayGJ0OfUoH1 wuqgqLcT7IOBWCbk/QF1hUQprVEcMvjG7TytomQ14vt32ijdnEJFS0jFLblxPEd/WoIstr aGzbNuQx4//UrnZlxKsOtnBEC5Uowfh4ROI98kp2cqXdo93TTPHRS992NSHK7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643491083; a=rsa-sha256; cv=none; b=xLJw79vrqaK46/vG8RCsWUKxbTiGBoda9ECqvd8ETPscZqcsmmK+kbzieHbo2FoMXgEXbz 4nlS899HYywJNq9wAdz6BEPcaXk9aqO1TQj8KU3UOwCgEFeEr/P9beoJjyAzzBl/GHNGAl ORWMNlCj3rZKGe4D/Hdd652Ci5a6h9dKY1w85lHVXE7O5MpAAABgey0a0il7HexiDiE+OU fzetkRpYZ97+j2gTg2k2ipCZawMSvktLw9Ru8lsh7o057G8/kq9vS2AGpg0OTF2d7NhOss y5Zza/coWpuvsEJS3EyX1njbdESZcLseHD1FSiGPXD6pIz1/AqAlN0SLw4YrwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5eafaf9e68894cda4e8dca5f363be0b4f15b5cd6 commit 5eafaf9e68894cda4e8dca5f363be0b4f15b5cd6 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-01-29 20:59:29 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-01-29 21:05:22 +0000 usbconfig.8: Improve style and fix examples - Use Ar macros for arguments - Stylize the argument synopsis to the -d flag - Change the width of the list to one of the actual tags in the list - Stylize "ugen" and "/dev/ugen" with Cm as those are constant strings, which are usually treated as command modifiers. - Break long lines to reduce the number of warnings from linters - Fix examples; the -d flag is now required when specifying the unit and the address with the "dot notation". MFC after: 2 weeks --- usr.sbin/usbconfig/usbconfig.8 | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/usr.sbin/usbconfig/usbconfig.8 b/usr.sbin/usbconfig/usbconfig.8 index e34cf7cfd5d0..0644199bdca7 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 21, 2021 +.Dd January 29, 2022 .Dt USBCONFIG 8 .Os .Sh NAME @@ -35,36 +35,46 @@ .Op Fl a Ar addr .Op Fl i Ar interface_index .Op Fl v -.Op cmds... +.Op Ar cmds ... .Nm -.Fl d Ar [[/dev/]ugen]. +.Fl d +.Sm off +.Oo Oo Cm /dev/ Oc Cm ugen Oc Ar unit Cm \&. Ar addr +.Sm on .Op Fl i Ar interface_index .Op Fl v -.Op cmds... +.Op Ar cmds ... .Sh DESCRIPTION The .Nm utility is used to configure and dump information about the USB subsystem. .Pp The options are as follows: -.Bl -tag -width " " +.Bl -tag -width "-u unit" .It Fl u Ar unit 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 [[/dev/]ugen]. +.It Xo +.Fl d +.Sm off +.Oo Oo Cm /dev/ Oc Cm ugen Oc Ar unit Cm \&. Ar addr +.Sm on +.Xc 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", +The unit and address coordinates may be prefixed by the lowercased word +.Cm ugen , or the full path name -.Pa /dev/ugen . +.Cm /dev/ugen . .It Fl h Show help and available commands. .It Fl i Ar interface_index Specify interface index as indicated by the command description. -If this argument is not specified a value of zero will be used for the interface index. +If this argument is not specified +a value of zero will be used for the interface index. .It Fl v -Shortcut to activate the +Activate the .Cm dump_device_desc , .Cm dump_curr_config_desc , and @@ -179,15 +189,15 @@ List all connected USB devices and their attached interface drivers: .Pp Dump device and configuration descriptors for device on USB bus 1 at address 2: .Pp -.Dl usbconfig ugen1.2 dump_all_desc +.Dl usbconfig -d ugen1.2 dump_all_desc .Pp Dump HID descriptor for device on USB bus 1 at address 2: .Pp -.Dl usbconfig ugen1.2 do_request 0x81 0x06 0x2200 0 0x100 +.Dl usbconfig -d ugen1.2 do_request 0x81 0x06 0x2200 0 0x100 .Pp Power off the device on USB bus 1 at address 2: .Pp -.Dl usbconfig ugen1.2 power_off +.Dl usbconfig -d ugen1.2 power_off .Sh SEE ALSO .Xr usb 4 , .Xr usb_quirk 4 ,