Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/virdomainobjlist.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index d640da6205..11fd68745b 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -815,6 +815,19 @@ virDomainObjListHelper(void *payload,
}
+/**
+ * virDomainObjListForEach:
+ * @doms: Pointer to the domain object list
+ * @callback: callback to run over each domain on the list
+ * @opaque: opaque data to pass to @callback
+ *
+ * For every domain on the list (@doms) run @callback on it. If
+ * @callback fails (i.e. returns a negative value), the iteration
+ * carries still on until all domains are visited.
+ *
+ * Returns: 0 on success,
+ * -1 otherwise.
+ */
int
virDomainObjListForEach(virDomainObjListPtr doms,
virDomainObjListIterator callback,
--
2.21.0