diff options
author | jkim <jkim@FreeBSD.org> | 2013-11-15 20:40:27 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-11-15 20:40:27 +0000 |
commit | a1672476f94b0c9ac84a682574aeb1eb481c484c (patch) | |
tree | 393e1854c22739c2db6213f80e859a02e4223818 /source/tools/acpiexec/aehandlers.c | |
parent | f4a31baa14e08b26c3b63f02571280c872cabe90 (diff) | |
download | FreeBSD-src-a1672476f94b0c9ac84a682574aeb1eb481c484c.zip FreeBSD-src-a1672476f94b0c9ac84a682574aeb1eb481c484c.tar.gz |
Import ACPICA 20131115.
Diffstat (limited to 'source/tools/acpiexec/aehandlers.c')
-rw-r--r-- | source/tools/acpiexec/aehandlers.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/source/tools/acpiexec/aehandlers.c b/source/tools/acpiexec/aehandlers.c index aad2705..2447414 100644 --- a/source/tools/acpiexec/aehandlers.c +++ b/source/tools/acpiexec/aehandlers.c @@ -98,6 +98,11 @@ AeAttachedDataHandler ( ACPI_HANDLE Object, void *Data); +static void +AeAttachedDataHandler2 ( + ACPI_HANDLE Object, + void *Data); + static UINT32 AeInterfaceHandler ( ACPI_STRING InterfaceName, @@ -605,7 +610,29 @@ AeAttachedDataHandler ( ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Data); - AcpiOsPrintf ("Received an attached data deletion on %4.4s\n", + AcpiOsPrintf ("Received an attached data deletion (1) on %4.4s\n", + Node->Name.Ascii); +} + + +/****************************************************************************** + * + * FUNCTION: AeAttachedDataHandler2 + * + * DESCRIPTION: Handler for deletion of nodes with attached data (attached via + * AcpiAttachData) + * + *****************************************************************************/ + +static void +AeAttachedDataHandler2 ( + ACPI_HANDLE Object, + void *Data) +{ + ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Data); + + + AcpiOsPrintf ("Received an attached data deletion (2) on %4.4s\n", Node->Name.Ascii); } @@ -1022,8 +1049,23 @@ AeInstallEarlyHandlers ( Status = AcpiDetachData (Handle, AeAttachedDataHandler); AE_CHECK_OK (AcpiDetachData, Status); + /* Test attach data at the root object */ + + Status = AcpiAttachData (ACPI_ROOT_OBJECT, AeAttachedDataHandler, + AcpiGbl_RootNode); + AE_CHECK_OK (AcpiAttachData, Status); + + Status = AcpiAttachData (ACPI_ROOT_OBJECT, AeAttachedDataHandler2, + AcpiGbl_RootNode); + AE_CHECK_OK (AcpiAttachData, Status); + + /* Test support for multiple attaches */ + Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle); AE_CHECK_OK (AcpiAttachData, Status); + + Status = AcpiAttachData (Handle, AeAttachedDataHandler2, Handle); + AE_CHECK_OK (AcpiAttachData, Status); } else { |