[PATCH 1/2] docs: Fix typos in the code comment

1. s/LifeCycle/Lifecycle/, 2. s/virConnectDomainEventTrayChangeReason/virDomainEventTrayChangeReason/ Signed-off-by: Han Han <hhan@redhat.com> --- include/libvirt/libvirt-domain.h | 2 +- include/libvirt/libvirt-network.h | 2 +- include/libvirt/libvirt-nodedev.h | 2 +- include/libvirt/libvirt-secret.h | 2 +- include/libvirt/libvirt-storage.h | 2 +- src/conf/domain_conf.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 5f0a9b7572..0647361952 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -4054,7 +4054,7 @@ typedef void (*virConnectDomainEventDiskChangeCallback)(virConnectPtr conn, void *opaque); /** - * virConnectDomainEventTrayChangeReason: + * virDomainEventTrayChangeReason: * * The reason describing why the callback was called */ diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h index 398d8fccd4..80bd03878b 100644 --- a/include/libvirt/libvirt-network.h +++ b/include/libvirt/libvirt-network.h @@ -262,7 +262,7 @@ typedef enum { * virConnectNetworkEventLifecycleCallback: * @conn: connection object * @net: network on which the event occurred - * @event: The specific virNetworkEventLifeCycleType which occurred + * @event: The specific virNetworkEventLifecycleType which occurred * @detail: contains some details on the reason of the event. * It will be 0 for the while. * @opaque: application specified data diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index 245365b07f..0c01d51aab 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -229,7 +229,7 @@ typedef enum { * virConnectNodeDeviceEventLifecycleCallback: * @conn: connection object * @dev: node device on which the event occurred - * @event: The specific virNodeDeviceEventLifeCycleType which occurred + * @event: The specific virNodeDeviceEventLifecycleType which occurred * @detail: contains some details on the reason of the event. * @opaque: application specified data * diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index b8e53674d8..bc1286883c 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -190,7 +190,7 @@ typedef enum { * virConnectSecretEventLifecycleCallback: * @conn: connection object * @secret: secret on which the event occurred - * @event: The specific virSecretEventLifeCycleType which occurred + * @event: The specific virSecretEventLifecycleType which occurred * @detail: contains some details on the reason of the event. * @opaque: application specified data * diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index f89856b93e..f8c665a18f 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -488,7 +488,7 @@ typedef enum { * virConnectStoragePoolEventLifecycleCallback: * @conn: connection object * @pool: pool on which the event occurred - * @event: The specific virStoragePoolEventLifeCycleType which occurred + * @event: The specific virStoragePoolEventLifecycleType which occurred * @detail: contains some details on the reason of the event. * @opaque: application specified data * diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index e2f35fe20b..6b25a91d80 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2823,7 +2823,7 @@ struct _virDomainDef { virDomainResourceDef *resource; virDomainIdMapDef idmap; - /* These 3 are based on virDomainLifeCycleAction enum flags */ + /* These 3 are based on virDomainLifecycleAction enum flags */ int onReboot; int onPoweroff; int onCrash; -- 2.34.1

Signed-off-by: Han Han <hhan@redhat.com> --- include/libvirt/libvirt-domain.h | 14 +++++++------- include/libvirt/libvirt-secret.h | 2 +- include/libvirt/libvirt-storage.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 0647361952..4da1a63a14 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -3281,7 +3281,7 @@ typedef enum { * @conn: virConnect connection * @dom: The domain on which the event occurred * @event: The specific virDomainEventType which occurred - * @detail: event specific detail information + * @detail: event specific detail information (virDomainEvent*DetailType) * @opaque: opaque user data * * A callback function to be registered, and called when a domain event occurs @@ -3783,7 +3783,7 @@ typedef enum { * virConnectDomainEventWatchdogCallback: * @conn: connection object * @dom: domain on which the event occurred - * @action: action that is to be taken due to watchdog firing + * @action: action that is to be taken due to watchdog firing (virDomainEventWatchdogAction) * @opaque: application specified data * * The callback signature to use when registering for an event of type @@ -3817,7 +3817,7 @@ typedef enum { * @dom: domain on which the event occurred * @srcPath: The host file on which the IO error occurred * @devAlias: The guest device alias associated with the path - * @action: action that is to be taken due to the IO error + * @action: action that is to be taken due to the IO error (virDomainEventIOErrorAction) * @opaque: application specified data * * The callback signature to use when registering for an event of type @@ -3836,7 +3836,7 @@ typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn, * @dom: domain on which the event occurred * @srcPath: The host file on which the IO error occurred * @devAlias: The guest device alias associated with the path - * @action: action that is to be taken due to the IO error + * @action: action that is to be taken due to the IO error (virDomainEventIOErrorAction) * @reason: the cause of the IO error * @opaque: application specified data * @@ -3940,7 +3940,7 @@ typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr; * virConnectDomainEventGraphicsCallback: * @conn: connection object * @dom: domain on which the event occurred - * @phase: the phase of the connection + * @phase: the phase of the connection (virDomainEventGraphicsPhase) * @local: the local server address * @remote: the remote client address * @authScheme: the authentication scheme activated @@ -4072,7 +4072,7 @@ typedef enum { * @conn: connection object * @dom: domain on which the event occurred * @devAlias: device alias - * @reason: why the tray status was changed? + * @reason: why the tray status was changed? (virDomainEventTrayChangeReason) * @opaque: application specified data * * This callback occurs when the tray of a removable device is moved. @@ -4653,7 +4653,7 @@ typedef void (*virConnectDomainEventBlockThresholdCallback)(virConnectPtr conn, * (virDomainMemoryFailureRecipientType) * @action: the action of hardware memory failure * (virDomainMemoryFailureActionType) - * @flags: the flags of hardware memory failure + * @flags: the flags of hardware memory failure (virDomainMemoryFailureFlags) * @opaque: application specified data * * The callback occurs when the hypervisor handles the hardware memory diff --git a/include/libvirt/libvirt-secret.h b/include/libvirt/libvirt-secret.h index bc1286883c..d24c5e96a2 100644 --- a/include/libvirt/libvirt-secret.h +++ b/include/libvirt/libvirt-secret.h @@ -191,7 +191,7 @@ typedef enum { * @conn: connection object * @secret: secret on which the event occurred * @event: The specific virSecretEventLifecycleType which occurred - * @detail: contains some details on the reason of the event. + * @detail: contains some details on the reason of the event. It will be 0 for the while. * @opaque: application specified data * * This callback is called when a secret lifecycle action is performed, diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-storage.h index f8c665a18f..3431cb35e0 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -489,7 +489,7 @@ typedef enum { * @conn: connection object * @pool: pool on which the event occurred * @event: The specific virStoragePoolEventLifecycleType which occurred - * @detail: contains some details on the reason of the event. + * @detail: contains some details on the reason of the event. It will be 0 for the while. * @opaque: application specified data * * This callback is called when a pool lifecycle action is performed, like start -- 2.34.1

On Wed, Jan 19, 2022 at 12:19:36PM +0800, Han Han wrote:
Signed-off-by: Han Han <hhan@redhat.com> --- include/libvirt/libvirt-domain.h | 14 +++++++------- include/libvirt/libvirt-secret.h | 2 +- include/libvirt/libvirt-storage.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
+++ b/include/libvirt/libvirt-secret.h @@ -191,7 +191,7 @@ typedef enum { * @conn: connection object * @secret: secret on which the event occurred * @event: The specific virSecretEventLifecycleType which occurred - * @detail: contains some details on the reason of the event. + * @detail: contains some details on the reason of the event. It will be 0 for the while. [...] +++ b/include/libvirt/libvirt-storage.h @@ -489,7 +489,7 @@ typedef enum { * @conn: connection object * @pool: pool on which the event occurred * @event: The specific virStoragePoolEventLifecycleType which occurred - * @detail: contains some details on the reason of the event. + * @detail: contains some details on the reason of the event. It will be 0 for the while.
These last two look out of place. I'll change them to (Currently unused) before pushing. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 19, 2022 at 12:19:35PM +0800, Han Han wrote:
1. s/LifeCycle/Lifecycle/, 2. s/virConnectDomainEventTrayChangeReason/virDomainEventTrayChangeReason/
Signed-off-by: Han Han <hhan@redhat.com> --- include/libvirt/libvirt-domain.h | 2 +- include/libvirt/libvirt-network.h | 2 +- include/libvirt/libvirt-nodedev.h | 2 +- include/libvirt/libvirt-secret.h | 2 +- include/libvirt/libvirt-storage.h | 2 +- src/conf/domain_conf.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Han Han