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