mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
789 B
C
31 lines
789 B
C
/*
|
|
* QMP commands related to ACPI
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "hw/acpi/acpi_dev_interface.h"
|
|
#include "qapi/error.h"
|
|
#include "qapi/qapi-commands-acpi.h"
|
|
|
|
ACPIOSTInfoList *qmp_query_acpi_ospm_status(Error **errp)
|
|
{
|
|
bool ambig;
|
|
ACPIOSTInfoList *head = NULL;
|
|
ACPIOSTInfoList **prev = &head;
|
|
Object *obj = object_resolve_path_type("", TYPE_ACPI_DEVICE_IF, &ambig);
|
|
|
|
if (obj) {
|
|
AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(obj);
|
|
AcpiDeviceIf *adev = ACPI_DEVICE_IF(obj);
|
|
|
|
adevc->ospm_status(adev, &prev);
|
|
} else {
|
|
error_setg(errp, "command is not supported, missing ACPI device");
|
|
}
|
|
|
|
return head;
|
|
}
|