1 #include "qemu/osdep.h"
2 #include "qemu/nvdimm-utils.h"
3 #include "hw/mem/nvdimm.h"
5 static int nvdimm_device_list(Object
*obj
, void *opaque
)
7 GSList
**list
= opaque
;
9 if (object_dynamic_cast(obj
, TYPE_NVDIMM
)) {
10 *list
= g_slist_append(*list
, DEVICE(obj
));
13 object_child_foreach(obj
, nvdimm_device_list
, opaque
);
18 * inquire NVDIMM devices and link them into the list which is
19 * returned to the caller.
21 * Note: it is the caller's responsibility to free the list to avoid
24 GSList
*nvdimm_get_device_list(void)
28 object_child_foreach(qdev_get_machine(), nvdimm_device_list
, &list
);