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
This commit is contained in:
parent
88ab2b6093
commit
ee38f2e004
@ -30,9 +30,10 @@ devd_prestart()
|
|||||||
{
|
{
|
||||||
find_pidfile
|
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
|
if ! checkyesno ${rcvar}; then
|
||||||
$SYSCTL hw.bus.devctl_disable=1
|
$SYSCTL hw.bus.devctl_queue=0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#define PIPE "/var/run/devd.pipe"
|
#define PIPE "/var/run/devd.pipe"
|
||||||
#define CF "/etc/devd.conf"
|
#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
|
* Since the client socket is nonblocking, we must increase its send buffer to
|
||||||
@ -1164,9 +1164,9 @@ check_devd_enabled()
|
|||||||
len = sizeof(val);
|
len = sizeof(val);
|
||||||
if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0)
|
if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0)
|
||||||
errx(1, "devctl sysctl missing from kernel!");
|
errx(1, "devctl sysctl missing from kernel!");
|
||||||
if (val) {
|
if (val == 0) {
|
||||||
warnx("Setting " SYSCTL " to 0");
|
warnx("Setting " SYSCTL " to 1000");
|
||||||
val = 0;
|
val = 1000;
|
||||||
sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val));
|
sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd February 11, 2003
|
.Dd March 26, 2014
|
||||||
.Dt DEVCTL 4
|
.Dt DEVCTL 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.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.
|
the rest of the data.
|
||||||
Listening programs are expected to cope.
|
Listening programs are expected to cope.
|
||||||
.Pp
|
.Pp
|
||||||
The sysctl and boot parameter
|
The sysctl
|
||||||
.Va hw.bus.devctl_disable
|
.Va hw.bus.devctl_queue
|
||||||
is used to disable
|
can be used to control queue length. It is set to 0 to disable
|
||||||
.Nm
|
.Nm
|
||||||
when no
|
when no
|
||||||
.Xr devd 8
|
.Xr devd 8
|
||||||
|
@ -232,16 +232,6 @@ See
|
|||||||
.Xr tuning 7
|
.Xr tuning 7
|
||||||
for more information.
|
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
|
hw.bus.devices
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user