From nobody Mon Feb 9 06:27:12 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=1568909545; cv=none; d=zoho.com; s=zohoarc; b=korwcDg9RTVgAnv4Lcz0hg6Vjjv5LbVdh1g1SN5fW3QY1w73ZTCw0t4iITnqqKxVgLBu4AYTbANS0SekD7jlOd5oI5QB2pxBfhk2REQjJ/IYMdVAfaZUEsbtdgGZ4RAvST0qZPEJVir7Ys6P4vcmKbK2cFnu4+vRoXjuu/+AxNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568909545; 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=Aw3BgHCcZ/VZb19EcOix7MQrf9Nt0RCxWDTxfLeTnBM=; b=XY8HsomtrmtFlPdAtniiO+x9c4FVGzqvWnsfjQ0JbOSwfP2iDroYZYb2LT6XdOozCjl89CH7LyhyhWKFFjhptypdu8yaR0mHB7pVtey/23LX8vISMie/UubmO7Ij8660pV83LEN+x/qPvs8yoCSknjhK5ir5RGJzWqfzRdoc+dA= 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 1568909545148503.9258517823023; Thu, 19 Sep 2019 09:12:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84CA68A1C92; Thu, 19 Sep 2019 16:12:23 +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 5FD475DA21; Thu, 19 Sep 2019 16:12:23 +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 13D974EE6F; Thu, 19 Sep 2019 16:12:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8JGAWAW032279 for ; Thu, 19 Sep 2019 12:10:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6673560BF1; Thu, 19 Sep 2019 16:10:32 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id E468760C57 for ; Thu, 19 Sep 2019 16:10:29 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 19 Sep 2019 18:10:18 +0200 Message-Id: <2c99a8082bdd60413fe3c359b376d88b70077775.1568909221.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/8] qemu: monitor: Remove support for HMP commands with fds 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Thu, 19 Sep 2019 16:12:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The remaining HMP commands don't require fd passing so we can purge filedescriptor passing support from qemuMonitorJSONHumanCommandWitFd and rename it. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 2 +- src/qemu/qemu_monitor_json.c | 11 +++++------ src/qemu/qemu_monitor_json.h | 7 +++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a50aea199d..6a09ba91ed 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1271,7 +1271,7 @@ qemuMonitorHMPCommand(qemuMonitorPtr mon, _("Unable to unescape command")); goto cleanup; } - ret =3D qemuMonitorJSONHumanCommandWithFd(mon, json_cmd, -1, reply); + ret =3D qemuMonitorJSONHumanCommand(mon, json_cmd, reply); cleanup: VIR_FREE(json_cmd); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index ae2b3c1992..22f6fc4947 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -1555,10 +1555,9 @@ static void qemuMonitorJSONHandleRdmaGidStatusChange= d(qemuMonitorPtr mon, int -qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon, - const char *cmd_str, - int scm_fd, - char **reply_str) +qemuMonitorJSONHumanCommand(qemuMonitorPtr mon, + const char *cmd_str, + char **reply_str) { virJSONValuePtr cmd =3D NULL; virJSONValuePtr reply =3D NULL; @@ -1569,7 +1568,7 @@ qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon, "s:command-line", cmd_str, NULL); - if (!cmd || qemuMonitorJSONCommandWithFd(mon, cmd, scm_fd, &reply) < 0) + if (!cmd || qemuMonitorJSONCommand(mon, cmd, &reply) < 0) goto cleanup; if (qemuMonitorJSONHasError(reply, "CommandNotFound")) { @@ -4634,7 +4633,7 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mo= n, int ret =3D -1; if (hmp) { - return qemuMonitorJSONHumanCommandWithFd(mon, cmd_str, -1, reply_s= tr); + return qemuMonitorJSONHumanCommand(mon, cmd_str, reply_str); } else { if (!(cmd =3D virJSONValueFromString(cmd_str))) goto cleanup; diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index af4e15594e..5330697885 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -41,10 +41,9 @@ int qemuMonitorJSONIOProcess(qemuMonitorPtr mon, size_t len, qemuMonitorMessagePtr msg); -int qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon, - const char *cmd, - int scm_fd, - char **reply); +int qemuMonitorJSONHumanCommand(qemuMonitorPtr mon, + const char *cmd, + char **reply); int qemuMonitorJSONSetCapabilities(qemuMonitorPtr mon); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list