| #include "qemu/nvdimm-utils.h" |
| #include "hw/mem/nvdimm.h" |
| static int nvdimm_device_list(Object *obj, void *opaque) |
| if (object_dynamic_cast(obj, TYPE_NVDIMM)) { |
| *list = g_slist_append(*list, DEVICE(obj)); |
| object_child_foreach(obj, nvdimm_device_list, opaque); |
| * inquire NVDIMM devices and link them into the list which is |
| * returned to the caller. |
| * Note: it is the caller's responsibility to free the list to avoid |
| GSList *nvdimm_get_device_list(void) |
| object_child_foreach(qdev_get_machine(), nvdimm_device_list, &list); |