diff options
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 { |