The VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON event allows @reason to be
reported to the user, but currently we only report 'enospc'.
Extend the documentation so that we allow the passthrough of the
verbatim error, prefixed by 'other: ' in order to prevent collisions and
note that users must not attempt to parse them.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
include/libvirt/libvirt-domain.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 2a4b81f4df..e031b23547 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -4790,8 +4790,12 @@ typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr
conn,
* If the I/O error is known to be caused by an ENOSPC condition in
* the host (where resizing the disk to be larger will allow the guest
* to be resumed as if nothing happened), @reason will be "enospc".
- * Otherwise, @reason will be "", although future strings may be added
- * if determination of other error types becomes possible.
+ *
+ * Otherwise, if the hypervisor reported an error @reason will be the verbatim
+ * error message from hypervisor prefixed by "other: ". Note that this error
+ * may not be stable and thus is only really usable for human use. In case
+ * when the hypervisor doesn't report the error @reason will be an empty string
+ * "".
*
* Since: 0.8.1
*/
--
2.48.1