{"id":2222033,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2222033/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260410160458.3778874-13-berrange@redhat.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.1/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260410160458.3778874-13-berrange@redhat.com>","date":"2026-04-10T16:04:53","name":"[12/17] monitor: drop unused monitor_cur_is_qmp","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"f62ccc914c22f88b129dd7f616cbfd14c747f387","submitter":{"id":2694,"url":"http://patchwork.ozlabs.org/api/1.1/people/2694/?format=json","name":"Daniel P. Berrangé","email":"berrange@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260410160458.3778874-13-berrange@redhat.com/mbox/","series":[{"id":499483,"url":"http://patchwork.ozlabs.org/api/1.1/series/499483/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499483","date":"2026-04-10T16:04:41","name":"monitor: turn QMP and HMP into QOM objects","version":1,"mbox":"http://patchwork.ozlabs.org/series/499483/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222033/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222033/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=XaHLJKyj;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fshYG507tz1yGb\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 02:08:18 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wBENW-0005BU-K2; Fri, 10 Apr 2026 12:06:42 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1wBEMk-0004B7-BG\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 12:05:54 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1wBEMi-0006XS-U3\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 12:05:54 -0400","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-199-y6RQM880OuSjuz1ReLMIng-1; Fri,\n 10 Apr 2026 12:05:50 -0400","from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 649A81955E80; Fri, 10 Apr 2026 16:05:49 +0000 (UTC)","from toolbx.redhat.corp (headnet01.pony-001.prod.iad2.dc.redhat.com\n [10.2.32.101])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 17BC419560AB; Fri, 10 Apr 2026 16:05:45 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775837152;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=pyf4Cmb2krQY4PLr2vKZ6i/tF7PVhVep/EsPhM+T6+M=;\n b=XaHLJKyj9vPEA83EGkxnFm36Vjzt6UAa/8P0e7TUkqsi//LKVdXjzqTWn/rHB1nwx1bzRH\n pHep0GZGOJ86csjvax08egi6lF3DB8suCFJP2bUwvUCIPhnRauw+qnYk0+ObjjBDWIG8sA\n vtFTZvZJYM5LpVQyrpGUd3hc0YMmkpQ=","X-MC-Unique":"y6RQM880OuSjuz1ReLMIng-1","X-Mimecast-MFC-AGG-ID":"y6RQM880OuSjuz1ReLMIng_1775837149","From":"=?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>","To":"qemu-devel@nongnu.org","Cc":"Paolo Bonzini <pbonzini@redhat.com>,\n Markus Armbruster <armbru@redhat.com>,\n Christian Brauner <brauner@kernel.org>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?Philippe_M?=\n\t=?utf-8?q?athieu-Daud=C3=A9?= <philmd@linaro.org>,\n Fabiano Rosas <farosas@suse.de>,\n =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Peter Xu <peterx@redhat.com>, Kevin Wolf <kwolf@redhat.com>, =?utf-8?q?Dani?=\n\t=?utf-8?q?el_P=2E_Berrang=C3=A9?= <berrange@redhat.com>,\n qemu-block@nongnu.org, \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Eric Blake <eblake@redhat.com>","Subject":"[PATCH 12/17] monitor: drop unused monitor_cur_is_qmp","Date":"Fri, 10 Apr 2026 17:04:53 +0100","Message-ID":"<20260410160458.3778874-13-berrange@redhat.com>","In-Reply-To":"<20260410160458.3778874-1-berrange@redhat.com>","References":"<20260410160458.3778874-1-berrange@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.17","Received-SPF":"pass client-ip=170.10.129.124;\n envelope-from=berrange@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"7","X-Spam_score":"0.7","X-Spam_bar":"/","X-Spam_report":"(0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=no autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"The previous patch dropped the only remaining use of\nmonitor_cur_is_qmp.\n\nSigned-off-by: Daniel P. Berrangé <berrange@redhat.com>\n---\n include/monitor/monitor.h      |  1 -\n monitor/monitor.c              | 10 ----------\n stubs/monitor-core.c           |  5 -----\n tests/unit/test-util-sockets.c |  1 -\n 4 files changed, 17 deletions(-)","diff":"diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h\nindex 7b0bda42c4..f66e465775 100644\n--- a/include/monitor/monitor.h\n+++ b/include/monitor/monitor.h\n@@ -25,7 +25,6 @@ extern QemuOptsList qemu_mon_opts;\n \n Monitor *monitor_cur(void);\n Monitor *monitor_set_cur(Coroutine *co, Monitor *mon);\n-bool monitor_cur_is_qmp(void);\n \n void monitor_init_globals(void);\n void monitor_init_globals_core(void);\ndiff --git a/monitor/monitor.c b/monitor/monitor.c\nindex 1326069b79..a3e69b3cec 100644\n--- a/monitor/monitor.c\n+++ b/monitor/monitor.c\n@@ -131,16 +131,6 @@ Monitor *monitor_set_cur(Coroutine *co, Monitor *mon)\n     return old_monitor;\n }\n \n-/**\n- * Is the current monitor, if any, a QMP monitor?\n- */\n-bool monitor_cur_is_qmp(void)\n-{\n-    Monitor *cur_mon = monitor_cur();\n-\n-    return cur_mon && monitor_is_qmp(cur_mon);\n-}\n-\n /**\n  * Is @mon is using readline?\n  * Note: not all HMP monitors use readline, e.g., gdbserver has a\ndiff --git a/stubs/monitor-core.c b/stubs/monitor-core.c\nindex 078a5012e9..a7c32297c9 100644\n--- a/stubs/monitor-core.c\n+++ b/stubs/monitor-core.c\n@@ -7,11 +7,6 @@ Monitor *monitor_cur(void)\n     return NULL;\n }\n \n-bool monitor_cur_is_qmp(void)\n-{\n-    return false;\n-}\n-\n Monitor *monitor_set_cur(Coroutine *co, Monitor *mon)\n {\n     return NULL;\ndiff --git a/tests/unit/test-util-sockets.c b/tests/unit/test-util-sockets.c\nindex b9f2453e29..ee66d727c3 100644\n--- a/tests/unit/test-util-sockets.c\n+++ b/tests/unit/test-util-sockets.c\n@@ -74,7 +74,6 @@ int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp)\n Monitor *monitor_cur(void) { return cur_mon; }\n Monitor *monitor_set_cur(Coroutine *co, Monitor *mon) { abort(); }\n int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) { abort(); }\n-bool monitor_cur_is_qmp(void) { abort(); };\n \n #ifndef _WIN32\n static void test_socket_fd_pass_name_good(void)\n","prefixes":["12/17"]}