Minor sysctl cleanup. The RW flag means read|write and so it is redundant

to add the RD flag.  Also, the debug node does not need to be writable.
This commit is contained in:
Nate Lawson 2006-06-10 08:04:38 +00:00
parent e4c7a7b169
commit 197b4dcc64
3 changed files with 8 additions and 10 deletions

View File

@ -218,7 +218,7 @@ static struct rman acpi_rman_io, acpi_rman_mem;
static const char* sleep_state_names[] = {
"S0", "S1", "S2", "S3", "S4", "S5", "NONE"};
SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging");
SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RD, NULL, "ACPI debugging");
static char acpi_ca_version[12];
SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD,
acpi_ca_version, 0, "Version of Intel ACPI-CA");
@ -516,14 +516,12 @@ acpi_attach(device_t dev)
OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW,
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
OID_AUTO, "sleep_delay", CTLFLAG_RD | CTLFLAG_RW,
&sc->acpi_sleep_delay, 0, "sleep delay");
OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
"sleep delay");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
OID_AUTO, "s4bios", CTLFLAG_RD | CTLFLAG_RW,
&sc->acpi_s4bios, 0, "S4BIOS mode");
OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, "S4BIOS mode");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW,
&sc->acpi_verbose, 0, "verbose mode");
OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode");
/*
* Default to 1 second before sleeping to give some machines time to

View File

@ -482,7 +482,7 @@ acpi_battery_init(void)
NULL, 0, acpi_battery_units_sysctl, "I", "number of batteries");
SYSCTL_ADD_INT(&acpi_battery_sysctl_ctx,
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
OID_AUTO, "info_expire", CTLFLAG_RD | CTLFLAG_RW,
OID_AUTO, "info_expire", CTLFLAG_RW,
&acpi_battery_info_expire, 0,
"time in seconds until info is refreshed");

View File

@ -242,12 +242,12 @@ acpi_tz_attach(device_t dev)
OID_AUTO, "thermal", CTLFLAG_RD, 0, "");
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
OID_AUTO, "min_runtime", CTLFLAG_RD | CTLFLAG_RW,
OID_AUTO, "min_runtime", CTLFLAG_RW,
&acpi_tz_min_runtime, 0,
"minimum cooling run time in sec");
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
OID_AUTO, "polling_rate", CTLFLAG_RD | CTLFLAG_RW,
OID_AUTO, "polling_rate", CTLFLAG_RW,
&acpi_tz_polling_rate, 0, "monitor polling rate");
}
sysctl_ctx_init(&sc->tz_sysctl_ctx);