HomeFreeBSD

acpi: in acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()

Description

acpi: in acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()

Otherwise we allow to trigger an MPASS() by a userland sysctl, e.g.
hw.acpi.power_button_state=NONE. This does not bring fully compatibility,
where as before 97d152698f483 setting to 'NONE' actually meant disabling
any action on a power or sleep button. Now sysctl will fail, but with
this change it won't at least panic.

Aymeric may come with a better fix.

Fixes: 97d152698f4831db5a94d55c15233330c188feda

Details

Provenance
glebiusAuthored on Mon, Oct 27, 6:22 PM
Parents
rG2fbb6e213ac2: closefrom_test: Convert to atf-c(3)
Branches
Unknown
Tags
Unknown