From nobody Thu May 2 00:10:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598013319; cv=none; d=zohomail.com; s=zohoarc; b=YSAvQQXHZWFJdFCK4bTrB8llHZVw9SvGqkI3tuAdPQ2PuRbdJm7K8ohRYSzo8cuKLR2xl5GuGUVBnQxJ/Nj/HhYotImNLrYq9cia0wOJKXGHYzp1+aua8OlOFsstXDbiFEZqANK6Z5lHFvafUDTri2DG7+OA/aJE6XhOadEvKyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598013319; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=LDa/iosvv3i5qvgwx3YlIfJF4jQDnrw37yh0VjogT9U=; b=V2tKXr4XPt2W3UcwAh6+R23gNRnzb6q/bSud5U5KCwQplpK+cHlp6ayzZcziOfWtkqxa3JUtwkc8yHyOKwOX8ARVdQ3Sdg4cm+mYlGcfuqKD4zn6S+/1aUrw4wQoHRved5EzkyucwQxPFtgOe0pt2/Bt/98kxY7jOhukePRhnsg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1598013319283930.5330561653659; Fri, 21 Aug 2020 05:35:19 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-325-q8_G8StQOaOmDMOt75Pp9A-1; Fri, 21 Aug 2020 08:35:15 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F32A18A2244; Fri, 21 Aug 2020 12:35:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0495D614F1; Fri, 21 Aug 2020 12:35:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 912839A021; Fri, 21 Aug 2020 12:35:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 07LCYw6k024135 for ; Fri, 21 Aug 2020 08:34:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 43FFF2157F45; Fri, 21 Aug 2020 12:34:58 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E6132157F24 for ; Fri, 21 Aug 2020 12:34:56 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 336BD857028 for ; Fri, 21 Aug 2020 12:34:56 +0000 (UTC) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-_ZnXI_TVNCW90YNnRp80vQ-1; Fri, 21 Aug 2020 08:34:54 -0400 Received: by mail-wr1-f69.google.com with SMTP id j2so512462wrr.14 for ; Fri, 21 Aug 2020 05:34:54 -0700 (PDT) Received: from auriga.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id h7sm5048802wmf.43.2020.08.21.05.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 05:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598013318; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LDa/iosvv3i5qvgwx3YlIfJF4jQDnrw37yh0VjogT9U=; b=aI96H2qkgVR4qA3zPw8U6Sfc8AfeynFdaizg7fdBkJK488Km2NLZm90eaAHw1Z3E3oVyMM wabn5w4lKwSmjSaDQdDqAC2aNb1amQfcNWM+Zn1k4tDqKHPQWA8jCLy4mFsCir87k4UVc9 b9Zq1OgT58cLwltA31hJaPmKQQQWOD8= X-MC-Unique: q8_G8StQOaOmDMOt75Pp9A-1 X-MC-Unique: _ZnXI_TVNCW90YNnRp80vQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LDa/iosvv3i5qvgwx3YlIfJF4jQDnrw37yh0VjogT9U=; b=YekqyOLa8wkhIzYCDw5bPwoCKwMuoAsVPPTaeTcn1WN8pjZC6Bp8uOEXnmeUOFutRa cjvKffvJ9xd5A9KPCpT4SEwnBoWXw1huEgyRkuh1h3PRIitjwYz/WzEj3rxcRG1QPJYa Kmb+BGlMOMWZtHDEPyyAExi5GPx1jXbRDpxDf+Au2pJF1QIyqqxL1Kv9AXtnEtLZFgKK VRpeRNmMW8VZZhPuw4p+AnPEnSUTVclf7EyXBX/p+f86GzDWVd9dhP4gJhhBTw9jJ2/I Vkriui9Qx2MkpOjrBqrYN9Iu++p8QiTU3Klu0awJkS/gMiATUnZy5GzCzIwHEdMqSMQk KDDQ== X-Gm-Message-State: AOAM533My5tRWSj8zQQdYTehZM/iG0S/SeTj0a4s+YBYxhsIQonI/G05 Lo/zHE7COT/08BupTs6E/XBB9EJXttQPrAzy6OtnayGJ4W8uk3d6YT9/w/SweZySK8pJKhFpIOY kEY8SPIahLDg5VkfEQzk= X-Received: by 2002:a1c:6a05:: with SMTP id f5mr3531522wmc.162.1598013293133; Fri, 21 Aug 2020 05:34:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHBq1e1AN+cqrSPi231L5RUdlJcQ0UM7gqA09hWI3SyFGsPN8zB0BSs+R7ffycU8A5pBsL7Q== X-Received: by 2002:a1c:6a05:: with SMTP id f5mr3531508wmc.162.1598013292926; Fri, 21 Aug 2020 05:34:52 -0700 (PDT) From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= To: libvir-list@redhat.com Subject: [libvirt PATCH] virsh: guest-agent-timeout: set default value for optional argument Date: Fri, 21 Aug 2020 14:34:51 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A1=C5=A1 Golembiovsk=C3=BD Reviewed-by: Michal Privoznik --- 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 =20 .. code-block:: =20 - guest-agent-timeout domain --timeout value + guest-agent-timeout domain [--timeout value] =20 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: =20 -* -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, =20 =20 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 =3D NULL; - int timeout; + int timeout =3D VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK; const unsigned int flags =3D 0; bool ret =3D false; =20 --=20 2.25.0