Bug 135608 - [patch] sysctl(8) should be able to handle byte values
Summary: [patch] sysctl(8) should be able to handle byte values
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-06-15 22:10 UTC by Kirill Stepanchuk
Modified: 2022-10-17 12:37 UTC (History)
0 users

See Also:


Attachments
file.diff (2.13 KB, patch)
2009-06-15 22:10 UTC, Kirill Stepanchuk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Stepanchuk 2009-06-15 22:10:06 UTC
Here is a patch to allow the sysctl interface to export byte values properly. This is sometimes needed if certain hardware needs to store a value as a byte in a struct. The sysctl interface would assume that the value is an 'int', with extraneous bits coming from neighbouring fields. This change adds a byte handler that internally converts unsigned bytes to ints, and then exports them to sysctl like a regular unsigned integer.

Fix: Patch attached with submission follows:
Comment 1 Bjoern A. Zeeb freebsd_committer freebsd_triage 2009-06-17 15:28:37 UTC
Whomever will put that into the tree at one point (perhaps with a
consumer), needs to to the V_irtualizing first.

-- 
Bjoern A. Zeeb                      The greatest risk is not taking one.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:58 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:37:13 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>