From owner-freebsd-hackers Fri Mar 14 17:20: 9 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F74337B401; Fri, 14 Mar 2003 17:20:07 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80F0843FA3; Fri, 14 Mar 2003 17:20:05 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b134.otenet.gr [212.205.244.142]) by mailsrv.otenet.gr (8.12.8/8.12.8) with ESMTP id h2F1K15u000098; Sat, 15 Mar 2003 03:20:02 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.8/8.12.8) with ESMTP id h2F1K0HG006334; Sat, 15 Mar 2003 03:20:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.8/8.12.8/Submit) id h2EJfK0Q005264; Fri, 14 Mar 2003 21:41:20 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 14 Mar 2003 21:41:19 +0200 From: Giorgos Keramidas To: Warner Losh , freebsd-hackers@freebsd.org Subject: style of sysctl description strings Message-ID: <20030314194119.GA5226@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline X-RAVMilter-Version: 8.4.2(snapshot 20021217) (terpsi) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 While trying to write a small script that would help Tom Rhodes to extract the list of sysctl names and descriptions from a running kernel, I noticed the following (pardon the long lines): hw.pci.enable_io_modes: Enable I/O and memory bits in the config register. Some BIOSes do not enable these bits correctly. We'd like to do this all the time, but there are some peripherals that this causes problems with. hw.pci.allow_unsupported_io_range: Allows the PCI Bridge to pass through an unsupported memory range assigned by the BIOS. The description of hw.pci.enable_io_modes uses embedded '\n' characters to keep the length of the description below 80 columns. It works fine. But only for the description text, which doesn't appear in the output of: % sysctl -dna | cut -c 80- | grep -v '^[[:space:]]*$' Strangely, this is the only sysctl that I could spot in the entire tree with '\n' characters in the description. The next sysctl in the output of sysctl -ad is hw.pci.allow_unsupported_io_range as shown above, which doesn't make any effort to keep the text below 80 columns. Is there a reason for wrapping with '\n'? If yes, what would that be? I'm only asking because it would make my life simpler if the sysctl descriptions didn't have embedded newlines, and this is a good opportunity to learn something too :-) - - Giorgos -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+cjBf1g+UGjGGA7YRAic3AJ0SgcgupeQiEqoOiBUWHbqzcMq1igCePFvC 9yg+XSZaqtXCpN3cKyyRjzU= =6IkN -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message