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.
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
)
16 ACPIOSTInfoList
*head
= NULL
;
17 ACPIOSTInfoList
**prev
= &head
;
18 Object
*obj
= object_resolve_path_type("", TYPE_ACPI_DEVICE_IF
, &ambig
);
21 AcpiDeviceIfClass
*adevc
= ACPI_DEVICE_IF_GET_CLASS(obj
);
22 AcpiDeviceIf
*adev
= ACPI_DEVICE_IF(obj
);
24 adevc
->ospm_status(adev
, &prev
);
26 error_setg(errp
, "command is not supported, missing ACPI device");