summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2014-03-26 02:25:40 +0000
committermjg <mjg@FreeBSD.org>2014-03-26 02:25:40 +0000
commit00964cfdfb63860aab46afa0574666b16517e7ae (patch)
tree925f3550fde72d2c4f0636d03ca178fb57e40432
parent135d99492fb8ef9c418ed8b4c4f76641bee39342 (diff)
downloadFreeBSD-src-00964cfdfb63860aab46afa0574666b16517e7ae.zip
FreeBSD-src-00964cfdfb63860aab46afa0574666b16517e7ae.tar.gz
Update userspace users of hw.bus.devctl_disable.
This fixes breakage resulting from r263754. Reported by: AN <andy@neu.net> Reviewed by: imp Pointy hat to: me
-rwxr-xr-xetc/rc.d/devd5
-rw-r--r--sbin/devd/devd.cc8
-rw-r--r--share/man/man4/devctl.48
-rw-r--r--tools/tools/sysdoc/tunables.mdoc10
4 files changed, 11 insertions, 20 deletions
diff --git a/etc/rc.d/devd b/etc/rc.d/devd
index 5976979..c7288e4 100755
--- a/etc/rc.d/devd
+++ b/etc/rc.d/devd
@@ -30,9 +30,10 @@ devd_prestart()
{
find_pidfile
- # If devd is disabled, turn it off in the kernel to avoid memory leaks.
+ # If devd is disabled, turn it off in the kernel to avoid unnecessary
+ # memory usage.
if ! checkyesno ${rcvar}; then
- $SYSCTL hw.bus.devctl_disable=1
+ $SYSCTL hw.bus.devctl_queue=0
fi
}
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index 77f74c6..ce2a4f3 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$");
#define PIPE "/var/run/devd.pipe"
#define CF "/etc/devd.conf"
-#define SYSCTL "hw.bus.devctl_disable"
+#define SYSCTL "hw.bus.devctl_queue"
/*
* Since the client socket is nonblocking, we must increase its send buffer to
@@ -1164,9 +1164,9 @@ check_devd_enabled()
len = sizeof(val);
if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0)
errx(1, "devctl sysctl missing from kernel!");
- if (val) {
- warnx("Setting " SYSCTL " to 0");
- val = 0;
+ if (val == 0) {
+ warnx("Setting " SYSCTL " to 1000");
+ val = 1000;
sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val));
}
}
diff --git a/share/man/man4/devctl.4 b/share/man/man4/devctl.4
index 50afee7..b86cf23 100644
--- a/share/man/man4/devctl.4
+++ b/share/man/man4/devctl.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 11, 2003
+.Dd March 26, 2014
.Dt DEVCTL 4
.Os
.Sh NAME
@@ -73,9 +73,9 @@ If you try to read this device a character at a time, you will lose
the rest of the data.
Listening programs are expected to cope.
.Pp
-The sysctl and boot parameter
-.Va hw.bus.devctl_disable
-is used to disable
+The sysctl
+.Va hw.bus.devctl_queue
+can be used to control queue length. It is set to 0 to disable
.Nm
when no
.Xr devd 8
diff --git a/tools/tools/sysdoc/tunables.mdoc b/tools/tools/sysdoc/tunables.mdoc
index 505c4a7..1c5569b 100644
--- a/tools/tools/sysdoc/tunables.mdoc
+++ b/tools/tools/sysdoc/tunables.mdoc
@@ -233,16 +233,6 @@ See
for more information.
---
-hw.bus.devctl_disable
-bool
-
-This can be used to turn off
-.Xr devctl 4
-when no
-.Xr devd 8
-is running.
-
----
hw.bus.devices
---
OpenPOWER on IntegriCloud