From nobody Mon Feb 9 16:12:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560799368; cv=none; d=zoho.com; s=zohoarc; b=cus1Znsz60E7XFbiSMyc0nsxOayBBzYfSEnXrvTdnTkgjcgxlucMpiH2mtA5b4BzWhaNPyEucyn2pp27b8nXM6DjKXhXg+w5YOXMStZup/AV7ihZTVvJjKnlp9yk/D8dMc2pk6MFkdz2L9z4uLC2Z/JhSR1cJJv9Q9yiYUxMQa0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560799368; h=Content-Transfer-Encoding:Cc: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=5w5eLlnQfYmPrhn0B4B67XqxJVEW3plrAkmjUqfsXkU=; b=UU0D0YaVQFhef7i4qujDw4QPk1Lc2u8z1/nEsBG4UTk69W+MNzsmoUcJGy/K/hXwunAgUuMp9CZNQEtZvlZn5k51PqRgkJ1T1RJUS+oKrDrPBt0W5HWGVQedsMsD2zvz1QRvUu9LHEeMwsXdFG4Rzmm7lKT+qxiQmYToaAE7i6c= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156079936882176.3077902415373; Mon, 17 Jun 2019 12:22:48 -0700 (PDT) Received: from localhost ([::1]:51440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcxDI-0000sL-Pi for importer@patchew.org; Mon, 17 Jun 2019 15:22:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40592) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcwhB-0001yI-DZ for qemu-devel@nongnu.org; Mon, 17 Jun 2019 14:49:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcwhA-00081C-90 for qemu-devel@nongnu.org; Mon, 17 Jun 2019 14:49:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60918) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hcwhA-0007lR-3C for qemu-devel@nongnu.org; Mon, 17 Jun 2019 14:49:32 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30B48223890 for ; Mon, 17 Jun 2019 18:49:08 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-117-177.ams2.redhat.com [10.36.117.177]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3629795B1; Mon, 17 Jun 2019 18:49:07 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 89EB41133025; Mon, 17 Jun 2019 20:49:03 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 17 Jun 2019 20:49:03 +0200 Message-Id: <20190617184903.19436-17-armbru@redhat.com> In-Reply-To: <20190617184903.19436-1-armbru@redhat.com> References: <20190617184903.19436-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 17 Jun 2019 18:49:08 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 16/16] vl: Deprecate -mon pretty=... for HMP monitors X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Kevin Wolf The -mon pretty=3Don|off switch of the -mon option applies only to QMP monitors. It's silently ignored for HMP. Deprecate this combination so that we can make it an error in future versions. Signed-off-by: Kevin Wolf Message-Id: <20190613153405.24769-16-kwolf@redhat.com> Reviewed-by: Markus Armbruster [Commit message tweaked] Signed-off-by: Markus Armbruster --- qemu-deprecated.texi | 6 ++++++ vl.c | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 50292d820b..df04f2840b 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -72,6 +72,12 @@ backend settings instead of environment variables. To e= ase migration to the new format, the ``-audiodev-help'' option can be used to convert the current values of the environment variables to ``-audiodev'' options. =20 +@subsection -mon ...,control=3Dreadline,pretty=3Don|off (since 4.1) + +The @code{pretty=3Don|off} switch has no effect for HMP monitors, but is +silently ignored. Using the switch with HMP monitors will become an +error in the future. + @subsection -realtime (since 4.1) =20 The @code{-realtime mlock=3Don|off} argument has been replaced by the diff --git a/vl.c b/vl.c index 32daa434eb..99a56b5556 100644 --- a/vl.c +++ b/vl.c @@ -2317,6 +2317,10 @@ static int mon_init_func(void *opaque, QemuOpts *opt= s, Error **errp) return -1; } =20 + if (!qmp && qemu_opt_get(opts, "pretty")) { + warn_report("'pretty' is deprecated for HMP monitors, it has no ef= fect " + "and will be removed in future versions"); + } if (qemu_opt_get_bool(opts, "pretty", 0)) { pretty =3D true; } @@ -2362,7 +2366,11 @@ static void monitor_parse(const char *optarg, const = char *mode, bool pretty) opts =3D qemu_opts_create(qemu_find_opts("mon"), label, 1, &error_fata= l); qemu_opt_set(opts, "mode", mode, &error_abort); qemu_opt_set(opts, "chardev", label, &error_abort); - qemu_opt_set_bool(opts, "pretty", pretty, &error_abort); + if (!strcmp(mode, "control")) { + qemu_opt_set_bool(opts, "pretty", pretty, &error_abort); + } else { + assert(pretty =3D=3D false); + } monitor_device_index++; } =20 --=20 2.21.0