From nobody Sun Feb 8 20:53:37 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=1568909581; cv=none; d=zoho.com; s=zohoarc; b=BpUiu0b8xvdoerVnmg7WKpIuZJ09pZX1TtPEJXw2EA0/0NvU7wN6AZMEWNwohThPi+CMMB4WtLPSS5pY0zSX2iiMNxrFqODsQBPSvLuUuxJLOVV8TcG+oRWdEWt71S40zDHKQ7PEvcHX+A0cRVAlOsUpf2A2GhTmkv9VjUlAhV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568909581; 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=5162V6uC+rhoH6BazFAwLKhHYvORE4FPVnWk/ETkhVo=; b=lVR/ApbzK5SK/XDK9HJgvlMT/dvF3OLKL6L7gZfZgZcQxU32wOUlte95xoPTTH98Mf3E9D19kGISKSy7/0/wmX1TJi2ibYlxgUpCr6OEYjDt7K1e1HooXwaRAol6kx7EVyO2HoB2nUg75GqsMnulpwOVWSf0abUTseI5f9Q9DfI= 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 1568909581289104.42714928754981; Thu, 19 Sep 2019 09:13:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CB4937FDFC; Thu, 19 Sep 2019 16:12:58 +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 9E45C60F8C; Thu, 19 Sep 2019 16:12:58 +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 587E84EEBA; Thu, 19 Sep 2019 16:12:58 +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 x8JGAaYm032321 for ; Thu, 19 Sep 2019 12:10:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6FD6A60C18; Thu, 19 Sep 2019 16:10:36 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC16C60BF1 for ; Thu, 19 Sep 2019 16:10:35 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 19 Sep 2019 18:10:23 +0200 Message-Id: <7db90e36811f0c0c851c1fc102da47dfea7e5c59.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 8/8] qemu: monitor: Remove qemuMonitorHMPCommand in favor of qemuMonitorJSONHumanCommand 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 19 Sep 2019 16:13:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Use the function directly rather than having a wrapper. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 11 ----------- src/qemu/qemu_monitor.h | 3 --- src/qemu/qemu_monitor_text.c | 11 ++++++----- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index af4c41fa16..b6d2936872 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1160,17 +1160,6 @@ qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon, } -int -qemuMonitorHMPCommand(qemuMonitorPtr mon, - const char *cmd, - char **reply) -{ - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONHumanCommand(mon, cmd, reply); -} - - /* Ensure proper locking around callbacks. */ #define QEMU_MONITOR_CALLBACK(mon, ret, callback, ...) \ do { \ diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index af1ec56525..b781a8cc89 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -426,9 +426,6 @@ int qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon, virDomainVideoDefPtr video, const char *videoName) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorHMPCommand(qemuMonitorPtr mon, - const char *cmd, - char **reply); int qemuMonitorEmitEvent(qemuMonitorPtr mon, const char *event, long long seconds, unsigned int micros, diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 7bc28e54c0..b1abcacdd0 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -23,6 +23,7 @@ #include "qemu_monitor_text.h" +#include "qemu_monitor_json.h" #include "viralloc.h" #include "virlog.h" #include "virerror.h" @@ -44,7 +45,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon, if (virAsprintf(&cmd, "drive_add dummy %s", drivestr) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply) < 0) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply) < 0) goto cleanup; if (strstr(reply, "unknown command:")) { @@ -94,7 +95,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon, if (virAsprintf(&cmd, "drive_del %s", drivestr) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply) < 0) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply) < 0) goto cleanup; if (strstr(reply, "unknown command:")) { @@ -133,7 +134,7 @@ qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, if (virAsprintf(&cmd, "savevm \"%s\"", name) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply)) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply)) goto cleanup; if (strstr(reply, "Error while creating snapshot") || @@ -168,7 +169,7 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, con= st char *name) if (virAsprintf(&cmd, "loadvm \"%s\"", name) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply)) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply)) goto cleanup; if (strstr(reply, "No block device supports snapshots")) { @@ -211,7 +212,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, c= onst char *name) if (virAsprintf(&cmd, "delvm \"%s\"", name) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply)) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply)) goto cleanup; if (strstr(reply, "No block device supports snapshots")) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list