From nobody Mon Feb 9 01:31:01 2026 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; 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 1516893850805685.0634373540836; Thu, 25 Jan 2018 07:24:10 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 09C3DA49E2; Thu, 25 Jan 2018 15:24:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A39E26090C; Thu, 25 Jan 2018 15:24:09 +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 B70F118033DA; Thu, 25 Jan 2018 15:24:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0PFO7Ut008981 for ; Thu, 25 Jan 2018 10:24:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 81F52608F3; Thu, 25 Jan 2018 15:24:07 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 582BA6090C; Thu, 25 Jan 2018 15:23:55 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 25 Jan 2018 16:22:56 +0100 Message-Id: <23594ccda9d0813c1b019db7348d9e93f20bb884.1516893631.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 2/2] vsh: Cmd aliases lookups should return results for the aliased command 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 25 Jan 2018 15:24:10 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Unfortunately, we have a number of aliases in virsh and even though these are not visible any more, we have to support them. The problem is that when trying to print help for the alias, we get SIGSEGV because there isn't any @def structure anymore and we need to query the command being aliased instead. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1538570 Signed-off-by: Erik Skultety --- tools/vsh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/vsh.c b/tools/vsh.c index 761d2ec3a..37c292a03 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -3194,6 +3194,8 @@ cmdHelp(vshControl *ctl, const vshCmd *cmd) } =20 if ((def =3D vshCmddefSearch(name))) { + if (def->flags & VSH_CMD_FLAG_ALIAS) + def =3D vshCmddefSearch(def->alias); return vshCmddefHelp(ctl, def); } else if ((grp =3D vshCmdGrpSearch(name))) { return vshCmdGrpHelp(ctl, grp); --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list