summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-10-25 05:03:25 +0000
committernjl <njl@FreeBSD.org>2003-10-25 05:03:25 +0000
commitbcfcc4ec03c6e17a313c90ea3e6c8365ac38a56f (patch)
treef99a0a9cead000dd7aa9b256d999d0e451d0c239 /etc
parentcdc83babef20f1fd97d3bbab52fb817c3f07a8bf (diff)
downloadFreeBSD-src-bcfcc4ec03c6e17a313c90ea3e6c8365ac38a56f.zip
FreeBSD-src-bcfcc4ec03c6e17a313c90ea3e6c8365ac38a56f.tar.gz
Add devctl(4) notify support to ACPI. Various subsystems now notify
userland whenever events occur. See the example in devd.conf below to see how to use it.
Diffstat (limited to 'etc')
-rw-r--r--etc/devd.conf26
1 files changed, 26 insertions, 0 deletions
diff --git a/etc/devd.conf b/etc/devd.conf
index 2999115..4f46415 100644
--- a/etc/devd.conf
+++ b/etc/devd.conf
@@ -93,4 +93,30 @@ detach 10 {
action "/etc/pccard_ether $device-name stop";
};
+# Examples of notify hooks. A notify is a generic way for a kernel
+# subsystem to send event notification to userland.
+#
+# Here are some examples of ACPI notify handlers. ACPI subsystems that
+# generate notifies include the AC adapter, power/sleep buttons,
+# control method batteries, lid switch, and thermal zones.
+#
+# Information returned is not always the same as the ACPI notify
+# events. See the ACPI specification for more information about
+# notifies. Here is the information returned for each subsystem:
+#
+# ACAD: AC line state (0 is offline, 1 is online)
+# Button: Button pressed (0 for power, 1 for sleep)
+# CMBAT: ACPI battery events
+# Lid: Lid state (0 is closed, 1 is open)
+# Thermal: ACPI thermal zone events
+#
+# This example calls a script when the AC state changes, passing the
+# notify value as the first argument. If the state is 0x00, it might
+# call some sysctls to implement economy mode. If 0x01, it might set
+# the mode to performance.
+notify 10 {
+ match "system" "ACPI";
+ match "subsystem" "ACAD";
+ action "/etc/acpi_ac $notify";
+};
*/
OpenPOWER on IntegriCloud