acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description
Another boolean, indicating hardware support, will be introduced in next commit. Thanks to the previous commit modifying sysctl_handle_bool(), this change is backwards-compatible with old programs using an integer in and out of sysctl(3). Reviewed by: obiwac MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54626
This commit is contained in:
@@ -626,7 +626,7 @@ acpi_attach(device_t dev)
|
||||
|
||||
/* Only enable S4BIOS by default if the FACS says it is available. */
|
||||
if (AcpiGbl_FACS != NULL && AcpiGbl_FACS->Flags & ACPI_FACS_S4_BIOS_PRESENT)
|
||||
sc->acpi_s4bios = 1;
|
||||
sc->acpi_s4bios = true;
|
||||
|
||||
/*
|
||||
* Probe all supported ACPI sleep states. Awake (S0) is always supported,
|
||||
@@ -754,9 +754,9 @@ acpi_attach(device_t dev)
|
||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||
OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
|
||||
"sleep delay in seconds");
|
||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||
SYSCTL_ADD_BOOL(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||
OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0,
|
||||
"Use S4BIOS when hibernating.");
|
||||
"On hibernate, have the firmware save/restore the machine state (S4BIOS).");
|
||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||
OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode");
|
||||
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
|
||||
|
||||
@@ -64,7 +64,7 @@ struct acpi_softc {
|
||||
enum power_stype acpi_lid_switch_stype;
|
||||
|
||||
int acpi_standby_sx;
|
||||
int acpi_s4bios;
|
||||
bool acpi_s4bios;
|
||||
|
||||
int acpi_sleep_delay;
|
||||
int acpi_do_disable;
|
||||
|
||||
Reference in New Issue
Block a user