From owner-cvs-all@FreeBSD.ORG Thu Jun 21 22:50:37 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F067E16A421; Thu, 21 Jun 2007 22:50:37 +0000 (UTC) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E107213C457; Thu, 21 Jun 2007 22:50:37 +0000 (UTC) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5LMob3F038271; Thu, 21 Jun 2007 22:50:37 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5LMobq4038270; Thu, 21 Jun 2007 22:50:37 GMT (envelope-from njl) Message-Id: <200706212250.l5LMobq4038270@repoman.freebsd.org> From: Nate Lawson Date: Thu, 21 Jun 2007 22:50:37 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/etc devd.conf rc.resume rc.suspend src/sys/i386/acpica acpi_machdep.c src/usr.sbin/acpi/acpiconf acpiconf.c src/sys/dev/acpica acpi.c acpiio.h acpivar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 22:50:38 -0000 njl 2007-06-21 22:50:37 UTC FreeBSD src repository Modified files: etc devd.conf rc.suspend rc.resume sys/i386/acpica acpi_machdep.c usr.sbin/acpi/acpiconf acpiconf.c sys/dev/acpica acpi.c acpiio.h acpivar.h Log: Update the suspend/resume user API while maintaining backwards compat. Improvements: * /etc/rc.suspend,rc.resume are always run, no matter the source of the suspend request (user or kernel, apm or acpi) * suspend now requires positive user acknowledgement. If a user program wants to cancel the suspend, they can. If one of the user programs hangs or doesn't respond within 10 seconds, the system suspends anyway. * /dev/apm is clonable, allowing multiple listeners for suspend events. In the future, xorg-server can use this to be informed about suspend even if there are other listeners (i.e. apmd). Changes: * Two new ACPI ioctls: REQSLPSTATE and ACKSLPSTATE. Request begins the process of suspending by notifying all listeners. acpi is monitored by devd(8) and /dev/apm listener(s) are also counted. Users register their approval or disapproval via Ack. If anyone disapproves, suspend is vetoed. * Old user programs or kernel modules that used SETSLPSTATE continue to work. A message is printed once that this interface is deprecated. * acpiconf gains the -k flag to ack the suspend request. This flag is undocumented on purpose since it's only used by /etc/rc.suspend. It is not intended to be a permanent change and will be removed once a better power API is implemented. * S5 (power off) is no longer supported via acpiconf -s 5 or apm -z/-Z. This restores previous behavior of halt/shutdown -p being the interface. * Miscellaneous improvements to error reporting Approved by: re Revision Changes Path 1.38 +14 -0 src/etc/devd.conf 1.8 +8 -4 src/etc/rc.resume 1.7 +10 -5 src/etc/rc.suspend 1.240 +179 -12 src/sys/dev/acpica/acpi.c 1.17 +7 -1 src/sys/dev/acpica/acpiio.h 1.107 +25 -0 src/sys/dev/acpica/acpivar.h 1.36 +216 -26 src/sys/i386/acpica/acpi_machdep.c 1.26 +22 -28 src/usr.sbin/acpi/acpiconf/acpiconf.c