Bug 112556 - [patch]: sysctl(8) needs to fix multi-lineal descriptions
Summary: [patch]: sysctl(8) needs to fix multi-lineal descriptions
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 6.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alan Somers
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2007-05-10 00:10 UTC by Ighighi
Modified: 2017-12-01 15:32 UTC (History)
2 users (show)

See Also:
asomers: mfc-stable11+
asomers: mfc-stable10-


Attachments
file.diff (472 bytes, patch)
2007-05-10 00:10 UTC, Ighighi
no flags Details | Diff
Fix the strings in sys/dev/pci.c (2.72 KB, patch)
2015-08-22 22:20 UTC, Willem Jan Withagen
no flags Details | Diff
Fix the strings in the sysctl-mesgs (v2) (2.77 KB, patch)
2015-09-05 13:35 UTC, Willem Jan Withagen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ighighi 2007-05-10 00:10:03 UTC
This patch to sysctl(8) makes it handle multi-lineal descriptions
(currently found in hw.pci.enable_io_modes, hw.pci.do_power_nodriver,
hw.pci.host_mem_start & hw.pci.irq_override_mask) so they appear on just
one line.  A patch to the PCI files available upon request but other
modules that I didn't load could have multi-line descriptions as well,
so patching sysctl(8) is necessary.

Fix: Attached patch available.

Patch attached with submission follows:
How-To-Repeat: /sbin/sysctl -d hw.pci.enable_io_modes hw.pci.do_power_nodriver
hw.pci.host_mem_start hw.pci.irq_override_mask
Comment 1 Willem Jan Withagen 2015-08-22 22:20:24 UTC
Created attachment 160227 [details]
Fix the strings in sys/dev/pci.c

Use the precompiler to concat strings as not to exceed the 78 char width
Comment 2 Willem Jan Withagen 2015-09-05 13:35:20 UTC
Created attachment 160742 [details]
Fix the strings in the sysctl-mesgs (v2)
Comment 3 Alan Somers freebsd_committer freebsd_triage 2017-08-24 14:35:03 UTC
It seems to me that Only wjw's patch should be necessary.  The older patch is incorrect.  Also, wjw missed some sysctl's with embedded newlines.  I find the following:

hw.pci.usb_early_takeover
hw.pci.do_power_nodriver
hw.pci.enable_io_modes
hw.pcic.pd6722_vsense
hw.pcic.intr_mask
Comment 4 Willem Jan Withagen 2017-08-24 14:53:18 UTC
(In reply to Alan Somers from comment #3)

Hi Alan,

Could very well be. This dates back as far as 2015. And I used several ways to find all the culprits. But likely I missed some.

--WjW
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-10-09 22:28:00 UTC
A commit references this bug:

Author: asomers
Date: Mon Oct  9 22:27:38 UTC 2017
New revision: 324457
URL: https://svnweb.freebsd.org/changeset/base/324457

Log:
  Remove embedded newlines from sysctl variable descriptions

  PR:		112556
  Submitted by:	Willem Jan Withagen <wjw@digiware.nl> (earlier version)
  Reported by:	Willem Jan Withagen, ighighi@gmail.com
  MFC after:	3 weeks
  Sponsored by:	Spectra Logic Corp

Changes:
  head/sys/dev/pccbb/pccbb_isa.c
  head/sys/dev/pci/pci.c
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-11-28 16:09:21 UTC
A commit references this bug:

Author: asomers
Date: Tue Nov 28 16:09:02 UTC 2017
New revision: 326316
URL: https://svnweb.freebsd.org/changeset/base/326316

Log:
  MFC r324457:

  Remove embedded newlines from sysctl variable descriptions

  PR:		112556
  Submitted by:	Willem Jan Withagen <wjw@digiware.nl> (earlier version)
  Reported by:	Willem Jan Withagen, ighighi@gmail.com
  Sponsored by:	Spectra Logic Corp

Changes:
_U  stable/11/
  stable/11/sys/dev/pccbb/pccbb_isa.c
  stable/11/sys/dev/pci/pci.c