Bug 203918 - [patch] sysctl -t to display field types
Summary: [patch] sysctl -t to display field types
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Marcelo Araujo
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-10-21 07:58 UTC by ota
Modified: 2017-12-17 07:11 UTC (History)
2 users (show)

See Also:


Attachments
sysctl -t patch (3.25 KB, patch)
2015-10-21 07:58 UTC, ota
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ota 2015-10-21 07:58:38 UTC
Created attachment 162274 [details]
sysctl -t patch

Added -t option to display field types.  It may be used together with -d option.
This made easier to find field types when toying sysctls in systat.

% sysclt -t -a
kern.ostype: string
kern.osrelease: string
kern.osrevision: integer
kern.version: string
kern.maxvnodes: integer
kern.maxproc: integer
kern.maxfiles: integer
kern.argmax: integer
kern.securelevel: integer
kern.hostname: string
kern.hostid: unsigned long
kern.clockrate: opaque

% sysctl -tda
kern.ostype: string: Operating system type
kern.osrelease: string: Operating system release
kern.osrevision: integer: Operating system revision
kern.version: string: Kernel version

% sysctl -e -tda
kern.ostype=string=Operating system type
kern.osrelease=string=Operating system release
kern.osrevision=integer=Operating system revision
kern.version=string=Kernel version
kern.maxvnodes=integer=Maximum number of vnodes
Comment 1 Marcelo Araujo freebsd_committer freebsd_triage 2015-11-25 02:50:42 UTC
I will take it. Thanks!
Comment 2 ota 2015-12-01 06:45:29 UTC
(In reply to Marcelo Araujo from comment #1)

By the way, it looks new types were added after I submitted the patch.
These new types need to be added for a complete list.
Comment 3 Marcelo Araujo freebsd_committer freebsd_triage 2015-12-09 03:24:02 UTC
Patch submitted for review.
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-12-10 02:11:54 UTC
A commit references this bug:

Author: araujo
Date: Thu Dec 10 02:11:42 UTC 2015
New revision: 292045
URL: https://svnweb.freebsd.org/changeset/base/292045

Log:
  Add -t option to display field types.

  PR:		bin/203918
  Submitted by:	ota <ota@j.email.ne.jp>
  Reviewed by:	cem
  Approved by:	bapt (mentor)
  Differential Revision:	https://reviews.freebsd.org/D4451

Changes:
  head/sbin/sysctl/sysctl.8
  head/sbin/sysctl/sysctl.c
Comment 5 Marcelo Araujo freebsd_committer freebsd_triage 2015-12-10 02:16:12 UTC
Committed with small changes, thank you!
Comment 6 vali gholami 2017-12-17 07:11:37 UTC
MARKED AS SPAM