diff options
| author | Olivier Certner <olce@FreeBSD.org> | 2026-01-09 09:53:39 +0000 |
|---|---|---|
| committer | Olivier Certner <olce@FreeBSD.org> | 2026-02-03 17:19:08 +0000 |
| commit | e401e6d3fc91679b16c5cfa4c473dcb8fcadacfa (patch) | |
| tree | 02638769366c8fc9280c6bdf54979bca07cebfe7 | |
| parent | 7f031c9f6b9ff8af7c901ff2645124a93b9de284 (diff) | |
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
| -rw-r--r-- | sys/dev/acpica/acpi.c | 6 | ||||
| -rw-r--r-- | sys/dev/acpica/acpivar.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 47bb47bfb0af..58ddb0a83922 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -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), diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index eea54178060f..51881c580d4b 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -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; |
