From nobody Mon Feb 9 02:13:44 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=1560443703; cv=none; d=zoho.com; s=zohoarc; b=jJu3+LvwEKA7t4VNZJ4uaO/o89GtpjRK8C6IlFkcJLGpf1NR/g3cyvOiZodXrJF3Z3EjM9a21so2XfZuc7FI3JzFqdJXctIS/kdahW/vzm7VcZr9NmQGkbFmWoekspD92wPbmrhAvC4okKevcjBsO4SIpBL9pNiBzzfmL0aYCxc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560443703; 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=802nGfkFHZQdbfwXwyJ/kLg3ftiLi810HJgkq91rpLE=; b=WqOez8yZF4SowbAMh8rrNLHdh3Df+N2v8F/xHUq/7NRzhFDy8qII56S9YHJ1onbDaOnIqDv8UanANUeyRJRsvzIn+eV6NO2BjjMwBSijwdBz3Sz9hXWWVgktd2Dd/QpsS5NPFghWKDWlz+dvcMgZqblhTCv0AdsmPTCqYCRd/30= 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 15604437034761017.0745630776314; Thu, 13 Jun 2019 09:35:03 -0700 (PDT) Received: from localhost ([::1]:41544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSgl-0006KH-C6 for importer@patchew.org; Thu, 13 Jun 2019 12:34:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60379) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbRlp-00013z-I7 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 11:36:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbRln-0004Fo-II for qemu-devel@nongnu.org; Thu, 13 Jun 2019 11:36:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45980) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbRlU-00041M-Df; Thu, 13 Jun 2019 11:35:49 -0400 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 9D7362EF16E; Thu, 13 Jun 2019 15:35:34 +0000 (UTC) Received: from linux.fritz.box.com (ovpn-116-246.ams2.redhat.com [10.36.116.246]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16AAF60C7F; Thu, 13 Jun 2019 15:35:30 +0000 (UTC) From: Kevin Wolf To: qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:34:05 +0200 Message-Id: <20190613153405.24769-16-kwolf@redhat.com> In-Reply-To: <20190613153405.24769-1-kwolf@redhat.com> References: <20190613153405.24769-1-kwolf@redhat.com> MIME-Version: 1.0 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.29]); Thu, 13 Jun 2019 15:35:42 +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] [PATCH v3 15/15] 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: kwolf@redhat.com, berrange@redhat.com, qemu-block@nongnu.org, armbru@redhat.com, dgilbert@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The -mon pretty=3Don|off switch of the -mon option applies only the QMP monitors. It used to be silently ignored for HMP. Deprecate this combination so that we can make it an error in future versions. Signed-off-by: Kevin Wolf Reviewed-by: Markus Armbruster --- vl.c | 10 +++++++++- qemu-deprecated.texi | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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 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 --=20 2.20.1