From nobody Sun Apr 28 15:33:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1510801337584549.6422603611819; Wed, 15 Nov 2017 19:02:17 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 582BB34CD; Thu, 16 Nov 2017 03:02:15 +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 E4C59173B0; Thu, 16 Nov 2017 03:02:12 +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 5C3C54A467; Thu, 16 Nov 2017 03:02:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAG327Nu022989 for ; Wed, 15 Nov 2017 22:02:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9B5F36055F; Thu, 16 Nov 2017 03:02:07 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 94A5A60176 for ; Thu, 16 Nov 2017 03:02:05 +0000 (UTC) Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19B36356CE for ; Thu, 16 Nov 2017 03:02:05 +0000 (UTC) Received: by mail-qt0-f194.google.com with SMTP id 1so39350208qtn.3 for ; Wed, 15 Nov 2017 19:02:05 -0800 (PST) Received: from localhost.localdomain ([177.45.6.173]) by smtp.googlemail.com with ESMTPSA id y58sm101034qtb.9.2017.11.15.19.02.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 19:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=knq8ap/EEStrwrsm7xiKicT/j+yCAbc0vv5QP0G4juw=; b=Ulw36eyPiYIq7usyAIAQZ6EbL9EKm+FQJK8Jg+g3lqj14R4Z6MCk/Gm00PdexAG114 4REtw1k5A6xD9hf7yIvX0tQo6lG6XLjdvipKzFk9R5BiWvxHgBmUzo4xexNZUzbl4vIa VGuiWosMxnsAB6PIEv1p733LvEz51D4IG0LJ+oOLUIm/aigkKSNexFP1aNbQ5vhMEMSX 0pN22JCq1wdP+WZRkKv399h/JmNOz+jZ/NMXo9JcliM9D4maGmBJe+msn4w91+czA4Di eVO1rqSzGpToqnssaEd8+6q13aSNGKpto+AhY4kz/elVuWw7ImUO/ET7iE4i6lYtSJEu 7Zrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=knq8ap/EEStrwrsm7xiKicT/j+yCAbc0vv5QP0G4juw=; b=gA0jYIHzkT31bBKLh7CrQLq5qf57Rm405IpI6Av9NLUUQC6gEOorBK/D9bpnl9pzCt GjBrKtFE3trxRqChIUK34/1JdbgVmq7KgJNSwgsP28pARw632QUw8JMYqRScr5Hebvek USaIWtvvry9UweZcEkcCFILU8inA/8qfbkNGPjLYrN2DhKhkJwRJsbRPzSY7qNa66W/r BCGCgCwBySt5OGyE29afi6ziDNIdcwQsfXXanXrerTsSJfTwDgr31Pe8jqU+URwxXj5O QRA90oXfnYiGhMn8AqTSYNlVF35OlnSOzmBmIY4/UkkClS+OusJBdp5airbHFfhLRrwY e9gg== X-Gm-Message-State: AJaThX7q6lCAQPjxgLZwg5EPrSjKPT7evqTHt3en5jk6ZVz7fZMDptXw Q74bzy5qheW4mi4KMRXF/PMCcQ== X-Google-Smtp-Source: AGs4zMZE89Eqq2L9QF7S50tm0JRp38kDR9HmC3wIMVAiJ+lQbnNrjCkKDzj4Y49zwwurYdOAi2IEHQ== X-Received: by 10.237.56.226 with SMTP id k89mr291716qte.320.1510801324089; Wed, 15 Nov 2017 19:02:04 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Thu, 16 Nov 2017 01:01:54 -0200 Message-Id: <1510801314-6602-1-git-send-email-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 16 Nov 2017 03:02:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 16 Nov 2017 03:02:05 +0000 (UTC) for IP:'209.85.216.194' DOMAIN:'mail-qt0-f194.google.com' HELO:'mail-qt0-f194.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.37 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.216.194 mail-qt0-f194.google.com 209.85.216.194 mail-qt0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] virsh: fixing wrong datatype of 'set-lifcycle-action' command options. 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 16 Nov 2017 03:02:16 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The 'set-lifcycle-action' is throwing a weird error after executing it with the '--help' option. The command output is showing the options 'type' and 'action' are as optional, but they aren't. Both are required. virsh # set-lifecycle-action --help ... SYNOPSIS set-lifecycle-action [--type ] [--action ] ... ... OPTIONS [--domain] domain name, id or uuid error: internal error: bad options in command: 'set-lifecycle-action' After applying this patch, both arguments are required now. virsh # set-lifecycle-action --help ... SYNOPSIS set-lifecycle-action [--config] ... Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1509870 Signed-off-by: Julio Faracco --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 42d5526..bf96f2e 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -5532,12 +5532,12 @@ static const vshCmdInfo info_setLifecycleAction[] = =3D { static const vshCmdOptDef opts_setLifecycleAction[] =3D { VIRSH_COMMON_OPT_DOMAIN_FULL, {.name =3D "type", - .type =3D VSH_OT_STRING, + .type =3D VSH_OT_DATA, .flags =3D VSH_OFLAG_REQ, .help =3D N_("lifecycle type to modify") }, {.name =3D "action", - .type =3D VSH_OT_STRING, + .type =3D VSH_OT_DATA, .flags =3D VSH_OFLAG_REQ, .help =3D N_("lifecycle action to set") }, --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list