summaryrefslogtreecommitdiffstats
path: root/sbin/sysctl
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2011-01-17 23:36:53 +0000
committermdf <mdf@FreeBSD.org>2011-01-17 23:36:53 +0000
commit071d9f885a78d6b5cfd535a5c3626ea73d04e134 (patch)
tree6c5af273d9d3c9ce1c9eb999d64e0b7a592c39d8 /sbin/sysctl
parentf5a8d0767612894229f3e6e68fd7eaac1c0029cd (diff)
downloadFreeBSD-src-071d9f885a78d6b5cfd535a5c3626ea73d04e134.zip
FreeBSD-src-071d9f885a78d6b5cfd535a5c3626ea73d04e134.tar.gz
The kernel is not exporting any "T,dev_t" sysctl nodes anymore, so
remove the capability and mention from sysctl(8).
Diffstat (limited to 'sbin/sysctl')
-rw-r--r--sbin/sysctl/sysctl.816
-rw-r--r--sbin/sysctl/sysctl.c42
2 files changed, 2 insertions, 56 deletions
diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8
index 1f5c8e6..dbdf187 100644
--- a/sbin/sysctl/sysctl.8
+++ b/sbin/sysctl/sysctl.8
@@ -134,9 +134,7 @@ few bytes.
.Pp
The information available from
.Nm
-consists of integers, strings, devices
-.Pq Vt dev_t ,
-and opaque types.
+consists of integers, strings, and opaque types.
The
.Nm
utility
@@ -165,17 +163,8 @@ For a detailed description of these variable see
.Pp
The changeable column indicates whether a process with appropriate
privilege can change the value.
-String, integer, and devices values can be set using
+String, and integer values can be set using
.Nm .
-For device values,
-.Ar value
-can be specified as a character device special file name.
-Special values
-.Cm off
-and
-.Cm none
-denote
-.Dq no device .
.Bl -column security.bsd.unprivileged_read_msgbuf integerxxx
.It Sy "Name Type Changeable
.It "kern.ostype string no
@@ -220,7 +209,6 @@ denote
.It "hw.floatingpoint integer no
.It "hw.machine_arch string no
.It "hw.realmem integer no
-.It "machdep.console_device dev_t no
.It "machdep.adjkerntz integer yes
.It "machdep.disable_rtc_set integer yes
.It "machdep.guessed_bootdev string no
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index 93ff8c6..de37c8b 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -67,7 +67,6 @@ static int show_var(int *, int);
static int sysctl_all(int *oid, int len);
static int name2oid(char *, int *);
-static void set_T_dev_t(char *, void **, size_t *);
static int set_IK(const char *, int *);
static void
@@ -287,10 +286,6 @@ parse(char *string)
newsize = sizeof(quadval);
break;
case CTLTYPE_OPAQUE:
- if (strcmp(fmt, "T,dev_t") == 0) {
- set_T_dev_t (newval, &newval, &newsize);
- break;
- }
/* FALLTHROUGH */
default:
errx(1, "oid '%s' is type %d,"
@@ -420,40 +415,6 @@ S_vmtotal(int l2, void *p)
}
static int
-T_dev_t(int l2, void *p)
-{
- dev_t *d = (dev_t *)p;
-
- if (l2 != sizeof(*d)) {
- warnx("T_dev_T %d != %zu", l2, sizeof(*d));
- return (1);
- }
- printf("%s", devname(*d, S_IFCHR));
- return (0);
-}
-
-static void
-set_T_dev_t(char *path, void **val, size_t *size)
-{
- static struct stat statb;
-
- if (strcmp(path, "none") && strcmp(path, "off")) {
- int rc = stat (path, &statb);
- if (rc) {
- err(1, "cannot stat %s", path);
- }
-
- if (!S_ISCHR(statb.st_mode)) {
- errx(1, "must specify a device special file.");
- }
- } else {
- statb.st_rdev = NODEV;
- }
- *val = (void *) &statb.st_rdev;
- *size = sizeof(statb.st_rdev);
-}
-
-static int
set_IK(const char *str, int *val)
{
float temp;
@@ -675,7 +636,6 @@ show_var(int *oid, int nlen)
free(oval);
return (0);
- case 'T':
case 'S':
i = 0;
if (strcmp(fmt, "S,clockinfo") == 0)
@@ -686,8 +646,6 @@ show_var(int *oid, int nlen)
func = S_loadavg;
else if (strcmp(fmt, "S,vmtotal") == 0)
func = S_vmtotal;
- else if (strcmp(fmt, "T,dev_t") == 0)
- func = T_dev_t;
else
func = NULL;
if (func) {
OpenPOWER on IntegriCloud