From patchwork Mon Jun 26 16:45:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9810101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DE53360329 for ; Mon, 26 Jun 2017 16:51:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D97032811A for ; Mon, 26 Jun 2017 16:51:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCEE628550; Mon, 26 Jun 2017 16:51:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4BAB2811A for ; Mon, 26 Jun 2017 16:51:10 +0000 (UTC) Received: from localhost ([::1]:47637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXED-000565-U5 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Jun 2017 12:51:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXAY-0002bv-9v for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPXAV-00039I-7T for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:22 -0400 Received: from mail-eopbgr50107.outbound.protection.outlook.com ([40.107.5.107]:45334 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dPXAU-00037E-Mv for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vgxY43ioIJK9sUcZi8nplaxmyzV0ASRFJsZmhDycA8o=; b=apOKMs3Y0PZRUMnitLurs++yX/juW6+uG5tFN5XZO/PKhizrkJ/9rK1WUg8RiPPp/sn/UfykbANemyR139m5ELaMEJw8oRwdqDWjz6le2J3Q0STXuo0r4gTfmGaQ0nHhftEFb0TbkCitC3qSLZrBqWB+gJ7CQ/yiRqDdoNqNJD4= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 26 Jun 2017 16:47:11 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 26 Jun 2017 19:45:47 +0300 Message-Id: <1498495550-72357-11-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2P15301CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::23) To VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9039c506-1cbb-4804-3248-08d4bcb3006a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 3:uoiDaWcMCXWIGjCYySYHu+TY0v36fL9QAtpFwEGIJCxujgiaN02fnCluJuHFgDq4sVAInPjOEu+7lgcRH2qr7X7EOFy/aLuNRbXRcB2tWY1PRpf0Vcaq8H8fzj3l8ZYSH8cY+Oj7v+aTRp3ch4xM1G+jJkYpe7VyFfmN7KACYR6kC8Ugu2ygx+SxDwdulaBYMz1HrXRzBZlB63GzjRgUWpnD0hIt7qvQfA7vgFRI1dwUZGFIijsfKNrz0v+FNFkBITq4UhHBknpmvklXUc3IlyLhN+Np9fBgLziL1KpEMv6giMh5xJPJEyDH3SUdEmkcpqQyb4Uj33v9tnnotfdSeBFO7hafh6paiFqr/BuGLRYO9zcgdAPiWj4ic2niW/MsEbgKDTw0l//rd8eB444obw/xYelaVKwjkK/9EvLWjoER2q4CrQRDio8U6XmQn4FUKszsECTu8krUi1QqbKRidBnw9XKc84ysZywd0Pt2PSEOCbymxqu/bN02937MPx2w2cj1G7pDDEXmnnVkYExsFxPf1Qs7ugsHeDk7m4VKwpysKcf924Qt5v8YUayYT0OtapKAz1M5uWKyC8Fw0CFc7lbFWzuP1LVy7vZSafXJ9N8nCvl6KWx80EavsrRBUcBZ7MaqreYwxc5UqAMCy82obvXNW4kduq6iHCHxhwgzRAcVUI4EuhXdmqBcAb61xg/i X-MS-TrafficTypeDiagnostic: VI1PR0801MB1998: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 25:P1shDGch9URXqRIVMTTLOtqe7neHLkm3eyAesI69b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: UriScan:(236129657087228)(148574349560750); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0801MB1998; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 4:f0KWw3iNKzFzeYysv+JuXjFcvegRo5k8bbkzUa+c?= =?us-ascii?Q?pLLSdeNOdsGC8Z30KhdpnIcU+ZlNLDsfXSRbD2+bP78Y/YeHl5RpV01vRQQC?= =?us-ascii?Q?NJKUi68AFjpbvPm5pfOeRBCMYwSaw1GbJ7ODtdlTX24yTPGPxZk9lYHNW9Pz?= =?us-ascii?Q?SjWlcZdEpANfAh0T3PNcjOUa1rQ25nq13opF7FeiOSS/r4ZovTsyxOujfsB+?= =?us-ascii?Q?xzrh0svaw1PODKRyRmqT3cV1K+anFOhY1yHoHXeSeNIvLuoDqnRq2tio0OWq?= =?us-ascii?Q?Pi8nd0dwFjfp+7t6mSSovEIwJhYYbR2cQu9ZBCSbIr+FCSs0NiV+8DPLn17/?= =?us-ascii?Q?L1Ww7QMYN/N/fNCnfC7IwYfp8u3HocI8IYt0fVK612sDvcu6o/tYBnh2kF9P?= =?us-ascii?Q?+al/KXZ+ec/MfDzfivgyID+rivsMaY4olOaPu4LRAFKRGF+wWPEdnfkt8oyJ?= =?us-ascii?Q?zLxLYifxIgikHeJduCQM4EGzvqPGC6Ms5qtCtdhpFGMQED1AKe7h3mturjqt?= =?us-ascii?Q?QeRDhEoj8mI/ni0EwMf60xGHYOv/0/5hvkwT2KUpGfzvQYq1xh8GvHMCWuNu?= =?us-ascii?Q?loudQ8WYHma3dZDBrsRpFJVbIxSyJUg1yz48DwmwTDHCzWZALmCXms/NxBbY?= =?us-ascii?Q?uZ6WbM3e+uJzj0hqk9r8Kc2lmhCtXVXkCnlFHY+qILc8fu8h39/XcVJsd9Ch?= =?us-ascii?Q?PaGp031O9zzb3SCmZkUxWJG25Zcu/G6/IhCstyQQG/CSb05mvKrpo9qG5j3I?= =?us-ascii?Q?b+UCkCdfSJG3wdRXOkgfAlHZhGMFwRTOKiLLa5JD2yekhr+QT8lcZ0+V/wZd?= =?us-ascii?Q?lTjHh7SUT6tMSu/aKlps7AA3XfPEEiyj23fUgETBS5x4lWjMDl4rFVsH8WXi?= =?us-ascii?Q?nfnDV/6J/+cnAkcaNiJJFYrN3YlSVYXk00nSycn39+3yz4LoRG+BViOaPQT9?= =?us-ascii?Q?hl7bh+9pxF8TiiRNfw7yKKwnRvnsYDelWFbhbPyX5cnMfPWyvAGBy0Mtg3a9?= =?us-ascii?Q?UQAYbQtkmWcIwhfmAk1sHjqMCa+hwBKS+cHjA+41F6mfa2xTKZeun1t8IWiJ?= =?us-ascii?Q?2AkSoPugh/BLv53wkmHVzVm5J1P/kFHoi6j8wtfStTFK49TQmKwHWm7YnO0p?= =?us-ascii?Q?1ZdsGTGzclk0x/FuzAYBpO7Z+FT30qcbjKiwm6MrrIEzObtoyCb49j4Mwx9p?= =?us-ascii?Q?i2onTO162RIiFwG+jVkrt3s5N0Ahm9ghrbVruW/qUFnJZKuKLmU5ZGwz+Q?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0350D7A55D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(189998001)(86362001)(53416004)(478600001)(53936002)(6486002)(5660300001)(50226002)(50466002)(42186005)(48376002)(5003940100001)(36756003)(81166006)(25786009)(50986999)(6506006)(76176999)(3846002)(66066001)(47776003)(305945005)(33646002)(54906002)(2906002)(38730400002)(110136004)(2361001)(6116002)(4326008)(7736002)(6512007)(2351001)(230783001)(2950100002)(8676002)(6666003)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1998; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 23:3L3jIH7eH9FnzLmgLRgu3SBQHEaNVyxmBS4xRGR?= =?us-ascii?Q?C2Ng6Gk7OIzcVmxgusHAgcHxpteCstDBboX1SDb/d4PVbED3qYHGHqW5c/z1?= =?us-ascii?Q?WLMx/DFwBuzmfdXB0pxE+c4piV+YK7280Cw7ZQW17PrCxz66WmuM7Vjy5Gi4?= =?us-ascii?Q?/EgCp27l34hHIGizygxVxuT5yIcaYRKq0M3id1FGzSW0Na3+sJ7nK+QEeYJe?= =?us-ascii?Q?h8aluGcY9KEyOFPCFIglj1VlqDiTaINuFYaDWEu687fQ8OMusdRx+AlxsyaJ?= =?us-ascii?Q?DS4dtx6nLMb6Tgb0CvhcgLaRSzBrPY4w89KCwwclJmWBG0IdTWGiqDVx/jSz?= =?us-ascii?Q?nuO6lH3oJtvxAse/1+Bsze/pfi+zZg06kqmFGpILsooE2VBmOkHA2ZIDBdww?= =?us-ascii?Q?j8P9EzgZ89yyADIY4vHLZldHdCXIm4vFbVKRb5t7K6GAzj6lpTTyz5Md69BG?= =?us-ascii?Q?sqO5l+F/Rk4WKz4AcTr35Tpw1yWOubQFu8gjwUAhtUmpmwoLz5BGpKUxTGON?= =?us-ascii?Q?q2zfPZx2DNM6Zh+BigRdHgUToIxKBvZxzAhOQF5yNZFe2IGUHr/Krn8e1Fgd?= =?us-ascii?Q?ONw0raWOymEejSMFr9YpARFmwH1fmRCUHCnARo73LnzZV+Qm24CSu+ZRPfkn?= =?us-ascii?Q?o+lcjFbLO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rqtW9YQY+boieWArpe7ThtKO7//k1yGX7o7s39WzYSQ/JuYI/hp89F+lG1jG+WTTCwDH7C2Ux0gF78s6gvx5rn2MN5UGqqwhBWNfqwsgbF7IdqD2q4+IOrPEy651htR3afqXVgztwLUApcEK52muBDebInb1vqvp6jB+GNe+hNwH4= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 20:Ew6bFa7cjJMsv+YW2H4u07wVnuCgrR9GacH2slsEXInMA6ZkbUScxADxxpxS8V5N6gaJi9XnGAEsfvqiQs/TwNWICm655GyJ1btXdj+3fQutyp3uNwImBoIdAvIxs8QKeF/ZSSmxox4crGU2Fk/tnkh7Xc6PG30wYsbSa5Z0Z4M= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 16:47:11.5866 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1998 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.5.107 Subject: [Qemu-devel] [PATCH v4 10/13] hmp: add hmp analogue for qmp-chardev-change X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, Anton Nefedov , den@virtuozzo.com, "Dr . David Alan Gilbert" , marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Dr. David Alan Gilbert Acked-by: Dr. David Alan Gilbert --- include/chardev/char.h | 10 ++++++++++ hmp.h | 1 + chardev/char.c | 2 +- hmp-commands.hx | 18 +++++++++++++++++- hmp.c | 34 ++++++++++++++++++++++++++++++++++ tests/test-hmp.c | 1 + 6 files changed, 64 insertions(+), 2 deletions(-) diff --git a/include/chardev/char.h b/include/chardev/char.h index 22fd734..1604ea9 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -81,6 +81,16 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, void qemu_chr_parse_common(QemuOpts *opts, ChardevCommon *backend); /** + * @qemu_chr_parse_opts: + * + * Parse the options to the ChardevBackend struct. + * + * Returns: a new backend or NULL on error + */ +ChardevBackend *qemu_chr_parse_opts(QemuOpts *opts, + Error **errp); + +/** * @qemu_chr_new: * * Create a new character backend from a URI. diff --git a/hmp.h b/hmp.h index d8b94ce..23e035c 100644 --- a/hmp.h +++ b/hmp.h @@ -102,6 +102,7 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict); void hmp_nbd_server_add(Monitor *mon, const QDict *qdict); void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict); void hmp_chardev_add(Monitor *mon, const QDict *qdict); +void hmp_chardev_change(Monitor *mon, const QDict *qdict); void hmp_chardev_remove(Monitor *mon, const QDict *qdict); void hmp_qemu_io(Monitor *mon, const QDict *qdict); void hmp_cpu_add(Monitor *mon, const QDict *qdict); diff --git a/chardev/char.c b/chardev/char.c index 6b2cb7b..8e8b881 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -567,7 +567,7 @@ static const char *chardev_alias_translate(const char *name) return name; } -static ChardevBackend *qemu_chr_parse_opts(QemuOpts *opts, Error **errp) +ChardevBackend *qemu_chr_parse_opts(QemuOpts *opts, Error **errp) { Error *local_err = NULL; const ChardevClass *cc; diff --git a/hmp-commands.hx b/hmp-commands.hx index e763606..2cad758 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1724,7 +1724,23 @@ ETEXI STEXI @item chardev-add args @findex chardev-add -chardev_add accepts the same parameters as the -chardev command line switch. +chardev-add accepts the same parameters as the -chardev command line switch. + +ETEXI + + { + .name = "chardev-change", + .args_type = "id:s,args:s", + .params = "id args", + .help = "change chardev", + .cmd = hmp_chardev_change, + }, + +STEXI +@item chardev-change args +@findex chardev-change +chardev-change accepts existing chardev @var{id} and then the same arguments +as the -chardev command line switch (except for "id"). ETEXI diff --git a/hmp.c b/hmp.c index 8c72c58..91e4317 100644 --- a/hmp.c +++ b/hmp.c @@ -2225,6 +2225,40 @@ void hmp_chardev_add(Monitor *mon, const QDict *qdict) hmp_handle_error(mon, &err); } +void hmp_chardev_change(Monitor *mon, const QDict *qdict) +{ + const char *args = qdict_get_str(qdict, "args"); + const char *id; + Error *err = NULL; + ChardevBackend *backend = NULL; + ChardevReturn *ret = NULL; + QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("chardev"), args, + true); + if (!opts) { + error_setg(&err, "Parsing chardev args failed"); + goto end; + } + + id = qdict_get_str(qdict, "id"); + if (qemu_opts_id(opts)) { + error_setg(&err, "Unexpected 'id' parameter"); + goto end; + } + + backend = qemu_chr_parse_opts(opts, &err); + if (!backend) { + goto end; + } + + ret = qmp_chardev_change(id, backend, &err); + +end: + qapi_free_ChardevReturn(ret); + qapi_free_ChardevBackend(backend); + qemu_opts_del(opts); + hmp_handle_error(mon, &err); +} + void hmp_chardev_remove(Monitor *mon, const QDict *qdict) { Error *local_err = NULL; diff --git a/tests/test-hmp.c b/tests/test-hmp.c index 99e35ec..299df19 100644 --- a/tests/test-hmp.c +++ b/tests/test-hmp.c @@ -22,6 +22,7 @@ static int verbose; static const char *hmp_cmds[] = { "boot_set ndc", "chardev-add null,id=testchardev1", + "chardev-change testchardev1 ringbuf", "chardev-remove testchardev1", "commit all", "cpu-add 1",