From owner-freebsd-arch@freebsd.org Fri Feb 12 00:12:28 2021 Return-Path: Delivered-To: freebsd-arch@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46EDC53B4B8 for ; Fri, 12 Feb 2021 00:12:28 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DcDTS09yTz3Jsv for ; Fri, 12 Feb 2021 00:12:28 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: by mailman.nyi.freebsd.org (Postfix) id 0448B53B2E9; Fri, 12 Feb 2021 00:12:28 +0000 (UTC) Delivered-To: arch@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 040C653B41D for ; Fri, 12 Feb 2021 00:12:28 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DcDTR4k69z3Jyf for ; Fri, 12 Feb 2021 00:12:27 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 11C0C9Ui029899 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Feb 2021 16:12:09 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 11C0C94Q029898; Thu, 11 Feb 2021 16:12:09 -0800 (PST) (envelope-from jmg) Date: Thu, 11 Feb 2021 16:12:09 -0800 From: John-Mark Gurney To: Lutz Donnerhacke Cc: Warner Losh , "freebsd-arch@freebsd.org" Subject: Re: adding a sysctl man section Message-ID: <20210212001209.GI31099@funkthat.com> Mail-Followup-To: Lutz Donnerhacke , Warner Losh , "freebsd-arch@freebsd.org" References: <20210211001505.GF31099@funkthat.com> <20210211075456.GA7928@belenus.iks-jena.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210211075456.GA7928@belenus.iks-jena.de> X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Thu, 11 Feb 2021 16:12:09 -0800 (PST) X-Rspamd-Queue-Id: 4DcDTR4k69z3Jyf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2021 00:12:28 -0000 Lutz Donnerhacke wrote this message on Thu, Feb 11, 2021 at 08:54 +0100: > On Wed, Feb 10, 2021 at 06:37:00PM -0700, Warner Losh wrote: > > On Wed, Feb 10, 2021 at 5:15 PM John-Mark Gurney wro= te: > > > Then, any page that describes a sysctl, would add an MLINK to it: > > > MLINK+=3D xhci.4 hw.usb.xhci.debug.s > > > > > > This section would be added to the default search, and then users > > > would simply be able to type: man and get directed to the > > > page that has information about it. > > > > > > Any objections? >=20 > I'd oppose, it will clutter the filesystem for a "man -k" (or similar) > shortcut. Can you expand exactly how/why this would happen? I assume you mean clutter the output from "man -k", but as "man -k" uses a db for it's data, it'd only slightly expand that db, but it wouldn't clutter the file system anymore, unless I'm missing something... So, in one test case, this is what you'd see (or maybe section 9, which I'm find with): # man -k xhci xhci, hw.usb.xhci.ctlquirk, hw.usb.xhci.ctlstep, hw.usb.xhci.debug, hw.usb.= xhci.dma32, hw.usb.xhci.streams, hw.usb.xhci.use_polling, hw.usb.xhci.xhci_= port_route(4, s) - USB eXtensible Host Controller driver yes, if you do a search for a generic term like debug, you'll end up a lot more extra output, BUT, "man -k debug" already outputs a wall of text that you're likely to need to filter anyways, so I don't see a major difference/problem here. I will say I'm a bit surprised there isn't an option to apropos to allow only displaying the first matching man page to shorten the lines a bit, but we already have this problem for some man pages: # find . -type f -ls | awk '{ print $1 }' | sort | uniq -c | sort | tail -n= 5 95 409059 98 405230 102 408573 116 397987 118 396855 409059 is nv(9) 405230 is snmpmod(3) 408573 is bhnd(9) 397987 is libusb(3) 396855 is curs_sp_funcs(3X) for example. # man -k libnv nvlist_create, nvlist_clone, nvlist_destroy, nvlist_dump, nvlist_empty, nvl= ist_error, nvlist_exists, nvlist_fdump, nvlist_flags, nvlist_free, nvlist_n= ext, nvlist_pack, nvlist_recv, nvlist_send, nvlist_set_error, nvlist_size, = nvlist_unpack, nvlist_xfer, nvlist_add_binary, nvlist_add_bool, nvlist_add_= bool_array, nvlist_add_descriptor, nvlist_add_descriptor_array, nvlist_add_= null, nvlist_add_number, nvlist_add_number_array, nvlist_add_nvlist, nvlist= _add_nvlist_array, nvlist_add_string, nvlist_add_string_array, nvlist_add_s= tringf, nvlist_add_stringv, nvlist_append_bool_array, nvlist_append_descrip= tor_array, nvlist_append_number_array, nvlist_append_nvlist_array, nvlist_a= ppend_string_array, nvlist_exists_binary, nvlist_exists_bool, nvlist_exists= _bool_array, nvlist_exists_descriptor, nvlist_exists_descriptor_array, nvli= st_exists_null, nvlist_exists_number, nvlist_exists_number_array, nvlist_ex= ists_nvlist, nvlist_exists_nvlist_array, nvlist_exists_string, nvlist_exist= s_type, nvlist_free_binary, nvlist_free_bool, nvlist_free_bool_array, nvlis= t_free_descriptor, nvlist_free_descriptor_array, nvlist_free_null, nvlist_f= ree_number, nvlist_free_number_array, nvlist_free_nvlist, nvlist_free_nvlis= t_array, nvlist_free_string, nvlist_free_string_array, nvlist_free_type, nv= list_get_binary, nvlist_get_bool, nvlist_get_bool_array, nvlist_get_descrip= tor, nvlist_get_descriptor_array, nvlist_get_number, nvlist_get_number_arra= y, nvlist_get_nvlist, nvlist_get_nvlist_array, nvlist_get_parent, nvlist_ge= t_string, nvlist_get_string_array, nvlist_move_binary, nvlist_move_descript= or, nvlist_move_descriptor_array, nvlist_move_nvlist, nvlist_move_nvlist_ar= ray, nvlist_move_string, nvlist_move_string_array, nvlist_take_binary, nvli= st_take_bool, nvlist_take_bool_array, nvlist_take_descriptor, nvlist_take_d= escriptor_array, nvlist_take_number, nvlist_take_number_array, nvlist_take_= nvlist, nvlist_take_nvlist_array, nvlist_take_string, nvlist_take_string_ar= ray, libnv, nv, nvlist, nvlist_in_array, nvlist_add, nvlist_append, nvlist_= get, nvlist_move, nvlist_take(9) - library for name/value pairs --=20 John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."