The timeout argument for guest-agent-timeout is optional but it did not have proper default value specified. Also update the virsh man page accordingly. Signed-off-by: Tomáš Golembiovský <tgolembi@xxxxxxxxxx> --- docs/manpages/virsh.rst | 7 ++++--- tools/virsh-domain.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 92de0b2192..6e48ae7973 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2631,15 +2631,16 @@ guest .. code-block:: - guest-agent-timeout domain --timeout value + guest-agent-timeout domain [--timeout value] Set how long to wait for a response from guest agent commands. By default, agent commands block forever waiting for a response. ``value`` must be a positive value (wait for given amount of seconds) or one of the following values: -* -2 - block forever waiting for a result, -* -1 - reset timeout to the default value, +* -2 - block forever waiting for a result (used when --timeout is omitted), +* -1 - reset timeout to the default value (currently defined as 5 seconds in + libvirt daemon), * 0 - do not wait at all, diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 286cf79671..1f3a549d9a 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -14207,7 +14207,7 @@ static bool cmdGuestAgentTimeout(vshControl *ctl, const vshCmd *cmd) { virDomainPtr dom = NULL; - int timeout; + int timeout = VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK; const unsigned int flags = 0; bool ret = false; -- 2.25.0