[PATCH v2 13/15] include: libvirt-domain: Reword documentation for @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON

Peter Krempa posted 15 patches 7 months, 1 week ago
[PATCH v2 13/15] include: libvirt-domain: Reword documentation for @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
Posted by Peter Krempa 7 months, 1 week ago
Emphasise that it's an enumeration and convert the possibilities to a
list of values with explanation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 include/libvirt/libvirt-domain.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 9e9016cfe7..941e67aab1 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -4805,11 +4805,13 @@ typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn,
  * The callback signature to use when registering for an event of type
  * VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON with virConnectDomainEventRegisterAny()
  *
- * 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.
+ * Although @reason is a string, it is considered to be an enumeration of the
+ * following values:
+ *
+ * - "" (empty string): unknown I/O error reason
+ * - "enospc": The I/O error is known to be caused by an ENOSPC condition in
+ *             the host. Resizing the disk source to be larger will allow the
+ *             guest to be resumed as if nothing happened.
  *
  * Since: 0.8.1
  */
-- 
2.48.1
Re: [PATCH v2 13/15] include: libvirt-domain: Reword documentation for @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
Posted by Daniel P. Berrangé 7 months, 1 week ago
On Tue, Jan 28, 2025 at 05:28:17PM +0100, Peter Krempa wrote:
> Emphasise that it's an enumeration and convert the possibilities to a
> list of values with explanation.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  include/libvirt/libvirt-domain.h | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|