qapi: Fix dangling references to docs/devel/qapi-code-gen.txt
[qemu/armbru.git] / hw / acpi / acpi-qmp-cmds.c
blob2d47cac52c0c7ac480c056a5b1c8bfd06be66c41
1 /*
2 * QMP commands related to ACPI
4 * This work is licensed under the terms of the GNU GPL, version 2 or
5 * (at your option) any later version.
6 */
8 #include "qemu/osdep.h"
9 #include "hw/acpi/acpi_dev_interface.h"
10 #include "qapi/error.h"
11 #include "qapi/qapi-commands-acpi.h"
13 ACPIOSTInfoList *qmp_query_acpi_ospm_status(Error **errp)
15 bool ambig;
16 ACPIOSTInfoList *head = NULL;
17 ACPIOSTInfoList **prev = &head;
18 Object *obj = object_resolve_path_type("", TYPE_ACPI_DEVICE_IF, &ambig);
20 if (obj) {
21 AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(obj);
22 AcpiDeviceIf *adev = ACPI_DEVICE_IF(obj);
24 adevc->ospm_status(adev, &prev);
25 } else {
26 error_setg(errp, "command is not supported, missing ACPI device");
29 return head;