From nobody Mon Dec 15 23:01:47 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1658846543; cv=none; d=zohomail.com; s=zohoarc; b=Gdsk7uA1ZWJLYDLp6KTpIOtOZ76DxvSN8uQqdKETbyxmP9TrRddvoelYfoQnZp9cpwTlWLe2B4GHuLmMkb3hp9y/B/gYsNEU9U9JdwSw+ZnTA7soLxVzejjOuZ8P3eNtLOKFu4ff637oZaFAoaIaO8cmo3iq+hfqghD6zYjjNho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658846543; 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; bh=DVAZydTx3dhVO0GrMoj4iu7K8czAYS7h0w0haSwlBPg=; b=hhhnOc7aK8UoEQfUlp7WjZcCgAud92HahYYxOCSp6NRkjrHZBqAAVrjs1SYIX0oq71mCMAcuMQa3D7CZly34oxHS+PMmJqmjUPuYw8uzGLjfeYrCfpQVO2IGwDZ06btbjpfL2wwwO3GiWDGIvnz/7mKJjZOt31ioqTNmv1doqM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 165884654315799.4553592707532; Tue, 26 Jul 2022 07:42:23 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-199-8RIK0RjdNv2zNglYcSRO7w-1; Tue, 26 Jul 2022 10:39:32 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A5E59824069; Tue, 26 Jul 2022 14:39:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8EC6D1415118; Tue, 26 Jul 2022 14:39:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E55961947B85; Tue, 26 Jul 2022 14:39:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8C3AD1947060 for ; Tue, 26 Jul 2022 14:38:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 51CC840CFD0A; Tue, 26 Jul 2022 14:38:56 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id D68F840CF8EE for ; Tue, 26 Jul 2022 14:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658846542; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=DVAZydTx3dhVO0GrMoj4iu7K8czAYS7h0w0haSwlBPg=; b=CNXaaBGFtCcvshlX2ihzRr1XWxD5PEHcKwM2HakO54EQgnWs1QKfmoMxLzit5qxPc+ICgf ygsYTSTVvCusMoiwlHRiB4rJSnGqHimfYhuvh6iVVW334uyC/tOSU+zqj7/sUbeVt4/Ctg Qxkril2ByPkwstptMmTWwR7yM+0w+fw= X-MC-Unique: 8RIK0RjdNv2zNglYcSRO7w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 57/80] qemu: monitor: Remove unused qemuMonitor(Eject|Change)Media Date: Tue, 26 Jul 2022 16:37:35 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658846544327100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- src/qemu/qemu_monitor.c | 27 ----------------- src/qemu/qemu_monitor.h | 9 ------ src/qemu/qemu_monitor_json.c | 57 ------------------------------------ src/qemu/qemu_monitor_json.h | 10 ------- tests/qemumonitorjsontest.c | 4 --- 5 files changed, 107 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f1a9524f28..456c54aed3 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2155,33 +2155,6 @@ qemuMonitorSetBalloon(qemuMonitor *mon, } -int -qemuMonitorEjectMedia(qemuMonitor *mon, - const char *dev_name, - bool force) -{ - VIR_DEBUG("dev_name=3D%s force=3D%d", dev_name, force); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONEjectMedia(mon, dev_name, force); -} - - -int -qemuMonitorChangeMedia(qemuMonitor *mon, - const char *dev_name, - const char *newmedia, - const char *format) -{ - VIR_DEBUG("dev_name=3D%s newmedia=3D%s format=3D%s", dev_name, newmedi= a, format); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONChangeMedia(mon, dev_name, newmedia, format); -} - - int qemuMonitorSaveVirtualMemory(qemuMonitor *mon, unsigned long long offset, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 6e657576ae..163e12c0f6 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -733,15 +733,6 @@ int qemuMonitorExpirePassword(qemuMonitor *mon, int qemuMonitorSetBalloon(qemuMonitor *mon, unsigned long long newmem); -int qemuMonitorEjectMedia(qemuMonitor *mon, - const char *dev_name, - bool force); -int qemuMonitorChangeMedia(qemuMonitor *mon, - const char *dev_name, - const char *newmedia, - const char *format); - - int qemuMonitorSaveVirtualMemory(qemuMonitor *mon, unsigned long long offset, unsigned long long length, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index b4a33184bd..9c54d7cfa4 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2812,63 +2812,6 @@ qemuMonitorJSONSetBalloon(qemuMonitor *mon, } -/** - * Run QMP command to eject a media from ejectable device. - * - * Returns: - * -1 on error - * 0 on success - */ -int qemuMonitorJSONEjectMedia(qemuMonitor *mon, - const char *dev_name, - bool force) -{ - g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("eject", - "s:device", d= ev_name, - "b:force", fo= rce, - NULL); - g_autoptr(virJSONValue) reply =3D NULL; - - if (!cmd) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - if (qemuMonitorJSONCheckError(cmd, reply) < 0) - return -1; - - return 0; -} - - -int qemuMonitorJSONChangeMedia(qemuMonitor *mon, - const char *dev_name, - const char *newmedia, - const char *format) -{ - g_autoptr(virJSONValue) cmd =3D NULL; - g_autoptr(virJSONValue) reply =3D NULL; - - cmd =3D qemuMonitorJSONMakeCommand("change", - "s:device", dev_name, - "s:target", newmedia, - "S:arg", format, - NULL); - - if (!cmd) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - if (qemuMonitorJSONCheckError(cmd, reply) < 0) - return -1; - - return 0; -} - - static int qemuMonitorJSONSaveMemory(qemuMonitor *mon, const char *cmdtype, unsigned long long offset, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 9314baa5ba..44458f703d 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -128,16 +128,6 @@ int qemuMonitorJSONSetBalloon(qemuMonitor *mon, unsigned long long newmem); -int -qemuMonitorJSONEjectMedia(qemuMonitor *mon, - const char *dev_name, - bool force); -int -qemuMonitorJSONChangeMedia(qemuMonitor *mon, - const char *dev_name, - const char *newmedia, - const char *format); - int qemuMonitorJSONSaveVirtualMemory(qemuMonitor *mon, unsigned long long offset, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index ced288cf5a..1368871cc8 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1199,8 +1199,6 @@ GEN_TEST_FUNC(qemuMonitorJSONBlockResize, "vda", "asd= f", 123456) GEN_TEST_FUNC(qemuMonitorJSONSetPassword, "spice", "secret_password", "dis= connect") GEN_TEST_FUNC(qemuMonitorJSONExpirePassword, "spice", "123456") GEN_TEST_FUNC(qemuMonitorJSONSetBalloon, 1024) -GEN_TEST_FUNC(qemuMonitorJSONEjectMedia, "hdc", true) -GEN_TEST_FUNC(qemuMonitorJSONChangeMedia, "hdc", "/foo/bar", "formatstr") GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar") GEN_TEST_FUNC(qemuMonitorJSONSavePhysicalMemory, 0, 1024, "/foo/bar") GEN_TEST_FUNC(qemuMonitorJSONMigrate, QEMU_MONITOR_MIGRATE_BACKGROUND | @@ -2988,8 +2986,6 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONSetPassword); DO_TEST_GEN(qemuMonitorJSONExpirePassword); DO_TEST_GEN(qemuMonitorJSONSetBalloon); - DO_TEST_GEN(qemuMonitorJSONEjectMedia); - DO_TEST_GEN_DEPRECATED(qemuMonitorJSONChangeMedia, true); DO_TEST_GEN(qemuMonitorJSONSaveVirtualMemory); DO_TEST_GEN(qemuMonitorJSONSavePhysicalMemory); DO_TEST_GEN(qemuMonitorJSONMigrate); --=20 2.36.1