summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-12-10 00:41:04 +0100
committerMichael S. Tsirkin <mst@redhat.com>2015-12-22 18:39:21 +0200
commit7b38ba9cb6fd47d89ab2db5b92ea6e4e6cd046cd (patch)
tree14308b7c46a80b40bf2dd4fde3dc8400fa552b4d /hw
parent7059eb4262d8a5575e5a81cdfac101d84a482c28 (diff)
downloadqemu-7b38ba9cb6fd47d89ab2db5b92ea6e4e6cd046cd.zip
acpi: add aml_call0() helper
it will help to call a method with 0 arguments Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/acpi/aml-build.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 74316d111a..b4fff5f0a8 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -540,6 +540,14 @@ Aml *aml_notify(Aml *arg1, Aml *arg2)
}
/* helper to call method with 1 argument */
+Aml *aml_call0(const char *method)
+{
+ Aml *var = aml_alloc();
+ build_append_namestring(var->buf, "%s", method);
+ return var;
+}
+
+/* helper to call method with 1 argument */
Aml *aml_call1(const char *method, Aml *arg1)
{
Aml *var = aml_alloc();