From nobody Mon Feb 9 09:00:11 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568637956; cv=none; d=zoho.com; s=zohoarc; b=HuxggNG4+E0qoDQpOfPRvkoC6nOgITw528DtzW7za6XYPcJOxmhKYzTjIb6F5E4ejoJtH2wyZxEuykSRdsjgaV0DNG1RmkeuUdYUNrpUuuLw+UrPlMJDHHhMxVo4lUnVSJgH8cuEMkXrjx5OhABva3nDogsXy2EJvE/md/Vf/9U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568637956; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=1/PHSONI4SUlBP6WE9DCN2RXxQ8Kf8pFEZkG0cMN8Bw=; b=gQooGrfd9LsJsUbFqNW3NdP1y08oZkmIMHEuBl2KQLDUtH+tFEIPpFEMp1blk7xtm91uuSiC82eY9qJHgI2hMeBIdbZ9ZFOBlbF6KRL5vfY98koCOFrV6J6xYvYd5/d9Rdcfcsk08HUSNLQXuPMynV2sjX3XK0/iptncaOaMckY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1568637956615363.9510832615449; Mon, 16 Sep 2019 05:45:56 -0700 (PDT) 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 E5899309BDBC; Mon, 16 Sep 2019 12:45:53 +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 BE7F55F7C0; Mon, 16 Sep 2019 12:45:53 +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 8081D180BA99; Mon, 16 Sep 2019 12:45:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8GCjfOJ026057 for ; Mon, 16 Sep 2019 08:45:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 911FA5D9E2; Mon, 16 Sep 2019 12:45:41 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B6C45D9E1 for ; Mon, 16 Sep 2019 12:45:40 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 16 Sep 2019 14:45:36 +0200 Message-Id: <11164729b9038e77be733e5ffa64505074e80d80.1568637841.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/5] virsh: Don't open-code virJSONStringReformat in cmdQemuMonitorCommand 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: , 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.45]); Mon, 16 Sep 2019 12:45:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Daniel Henrique Barboza --- tools/virsh-domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 8c24935938..fbfdc09c0d 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9512,7 +9512,6 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *= cmd) unsigned int flags =3D 0; const vshCmdOpt *opt =3D NULL; virBuffer buf =3D VIR_BUFFER_INITIALIZER; - VIR_AUTOPTR(virJSONValue) pretty =3D NULL; VSH_EXCLUSIVE_OPTIONS("hmp", "pretty"); @@ -9538,8 +9537,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *= cmd) if (vshCommandOptBool(cmd, "pretty")) { char *tmp; - pretty =3D virJSONValueFromString(result); - if (pretty && (tmp =3D virJSONValueToString(pretty, true))) { + if ((tmp =3D virJSONStringReformat(result, true))) { VIR_FREE(result); result =3D tmp; virTrimSpaces(result, NULL); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list