[PATCH 3/5] API: Document more possibilities for @reason field of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux