diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-06-16 19:12:25 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-06-19 18:44:22 +0300 |
commit | 6f2e27301d8cfea0a40dda7ec8a6dc1b9d0e228e (patch) | |
tree | bb96ab0df0678c752415cd13bc8d0218157b8ce0 /qmp.c | |
parent | c3ba3095070728f9c247f9e89652b9ea3f94319f (diff) |
qmp: add query-memory-devices command
... allowing to get state of present memory devices.
Currently implemented only for PCDIMMDevice.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'qmp.c')
-rw-r--r-- | qmp.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -28,6 +28,7 @@ #include "qapi/qmp-input-visitor.h" #include "hw/boards.h" #include "qom/object_interfaces.h" +#include "hw/mem/pc-dimm.h" NameInfo *qmp_query_name(Error **errp) { @@ -628,3 +629,13 @@ void qmp_object_del(const char *id, Error **errp) } object_unparent(obj); } + +MemoryDeviceInfoList *qmp_query_memory_devices(Error **errp) +{ + MemoryDeviceInfoList *head = NULL; + MemoryDeviceInfoList **prev = &head; + + qmp_pc_dimm_device_list(qdev_get_machine(), &prev); + + return head; +} |