From 39fb9417c0f72420fe3fcacfe4339d79d7333b6e Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 5 Mar 2022 16:58:35 +0000 Subject: [PATCH] Improve wording for trying S5 instead of S4 --- sys/dev/acpi/acpi_x86.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c index 25e09a49504..cca35a7c6cb 100644 --- a/sys/dev/acpi/acpi_x86.c +++ b/sys/dev/acpi/acpi_x86.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_x86.c,v 1.13 2022/02/17 17:17:09 deraadt Exp $ */ +/* $OpenBSD: acpi_x86.c,v 1.14 2022/03/05 16:58:35 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -45,12 +45,15 @@ sleep_showstate(void *v, int sleepmode) if (sc->sc_sleeptype[sc->sc_state].slp_typa == -1 || sc->sc_sleeptype[sc->sc_state].slp_typb == -1) { - printf("%s: state S%d unavailable\n", - sc->sc_dev.dv_xname, sc->sc_state); - if (sc->sc_state == ACPI_STATE_S4) + if (sc->sc_state == ACPI_STATE_S4) { sc->sc_state = ACPI_STATE_S5; /* No S4, use S5 */ - else + printf("%s: S5 unavailable, using S5\n", + sc->sc_dev.dv_xname); + } else { + printf("%s: state S%d unavailable\n", + sc->sc_dev.dv_xname, sc->sc_state); return (EOPNOTSUPP); + } } /* 1st suspend AML step: _TTS(tostate) */ -- 2.20.1