[PATCH 4/8] docs: Point to VIR_ERR_AGENT_COMMAND_TIMEOUT when setting timeout

Peter Krempa via Devel posted 8 patches 9 months ago
[PATCH 4/8] docs: Point to VIR_ERR_AGENT_COMMAND_TIMEOUT when setting timeout
Posted by Peter Krempa via Devel 9 months ago
From: Peter Krempa <pkrempa@redhat.com>

In addition to the error constant appearing add docs hinting that this
new error code can be produced on timeouts.

The most relevant place is to do it when setting the timeout.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 docs/manpages/virsh.rst | 3 +++
 src/libvirt-domain.c    | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index baced15dec..6f31bd9ca3 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -2909,6 +2909,9 @@ values:
   libvirt daemon),
 * 0 - do not wait at all,

+In all guest-agent based APIs when a timeout happens if an actual command was
+send to the guest agent the returned error code will be
+VIR_ERR_AGENT_COMMAND_TIMEOUT.

 guestinfo
 ---------
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 4e78c687d5..09c29df462 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -13519,6 +13519,10 @@ int virDomainSetLaunchSecurityState(virDomainPtr domain,
  *   VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAIT(0): does not wait.
  *   positive value: wait for @timeout seconds
  *
+ * In all guest-agent based APIs when a timeout happens if an actual command
+ * was send to the guest agent the returned error code will be
+ * VIR_ERR_AGENT_COMMAND_TIMEOUT.
+ *
  * Returns 0 on success, -1 on failure
  *
  * Since: 5.10.0
-- 
2.48.1