Enter the sleep state immediately without waiting for timeout if

devd(8) is not running such as the system in single user mode.

MFC after:	1 week
This commit is contained in:
Mitsuru IWASAKI 2008-01-27 16:11:04 +00:00
parent 4f7f6238af
commit 0c26519e5a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175727

View file

@ -2195,6 +2195,12 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state)
}
}
/* If devd(8) is not running, immediately enter the sleep state. */
if (devctl_process_running() == FALSE) {
ACPI_UNLOCK(acpi);
return (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate)));
}
/* Now notify devd(8) also. */
acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state);