]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuDomainObjWait: Add documentation
authorPeter Krempa <pkrempa@redhat.com>
Thu, 6 Jun 2024 16:04:57 +0000 (18:04 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 20 Jun 2024 07:52:55 +0000 (09:52 +0200)
Document why this function exists and meaning of return values.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c

index 9bbad887e0e0ea36993c45fcb59beb96214d416f..4eba4e91c5cce32fbc14367c09e3294588c886bc 100644 (file)
@@ -12368,6 +12368,18 @@ qemuDomainRemoveLogs(virQEMUDriver *driver,
 }
 
 
+/**
+ * qemuDomainObjWait:
+ * @vm: domain object
+ *
+ * Wait for a signal on the main domain condition. Take into account internal
+ * qemu state in addition to what virDomainObjWait checks. Code in the qemu
+ * driver must use this function exclusively instead of virDomainObjWait.
+ *
+ * Returns:
+ *  0 on successful wait AND VM is guaranteed to be running
+ *  -1 on failure to wait or VM was terminated while waiting
+ */
 int
 qemuDomainObjWait(virDomainObj *vm)
 {