From patchwork Thu Jul 6 12:08:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9828163 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 26D0860361 for ; Thu, 6 Jul 2017 12:22:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74E6C2842E for ; Thu, 6 Jul 2017 12:22:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68C8A285C3; Thu, 6 Jul 2017 12:22: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 7782E28590 for ; Thu, 6 Jul 2017 12:22:10 +0000 (UTC) Received: from localhost ([::1]:51203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5nL-0006xP-Ew for patchwork-qemu-devel@patchwork.kernel.org; Thu, 06 Jul 2017 08:22:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5cB-0005wZ-A7 for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dT5c7-0004y5-76 for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:35 -0400 Received: from mail-db5eur01on0101.outbound.protection.outlook.com ([104.47.2.101]:5600 helo=EUR01-DB5-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 1dT5c6-0004v6-OE for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:31 -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=o9akNPTLdP0oEBMq9uKw0ltkpVDSw1AaslxWlaAvnJg=; b=Lfz3PVi7hhbpKoVWqaLwbOSlG/ReUYl4KfDiJ3WGJe5ifyZZ5ypESyJSglT+ZMeBBQ8hhhDqh3Ng4LPwHy5znY/bFXjPbymw9KwwT37+2hj07HnQFv5dTBGNOp179v8Uyx3wasOsXNMMvJVyP0mwRTP7v6nsMhh0bGkOftEtNDo= 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 AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Thu, 6 Jul 2017 12:10:23 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Thu, 6 Jul 2017 15:08:57 +0300 Message-Id: <1499342940-56739-11-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2PR02CA0118.apcprd02.prod.outlook.com (2a01:111:e400:79aa::44) To AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 191bfc2d-7689-4a14-6ed3-08d4c467fdb9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 3:+1iBMbDoOQ+J++K+f6g3kGM3417dCGqd6v9OoKh6l/So0fVHwhEvuT9EcqaF34zHe/hJMaL9sNlHkySHm+BpATLpM0R4KpH4qsGlJoU0rbFUKdbke/Z7ga2PlUb5v8cKCyoJotu0GQTb0qO3jje5I1hSjtqyl+B3kZgmS0b1jLk8cPmJeQ07mM0pRie7NVJ7RWq8sCdh690qWVWeAPOS0dwXHlBiIr6yudF9mKJG8VbssoBlWvDHRGsl8UOJDBjlLc5BVXCJMf3T4yJ4IYmA+8q5Hbfw62d4csU0fRbH1pKpSmFYYd+vux9SXQh9GPv8BCtt+443WpgExu4fCip7w9VX6RFAXWdbZNTNa7iTOjp6GoF92Ylaw+2K5sppHTWK6nSMxCjDMwpp156yaHZKDU8fWrPpGxtre7TNOdJpBN7cJHG58GqcnU441zJwtXYYN1JjN2W1A1zLSgvl0wggR97U3TAj6FPSb2zXLhcpzRhAN4CxGhitZl7tw4FD/r1PBdNGYnr107D2Auw8zoK4VhBoVupxnpkEaU71rkYBMMUa+H/jIT+lxov+XBUl9iIIdmIguuxmJBV5h/VovMEBb0ZCjYaeYBcUG8x0gMT50Uw5Qh/uGLMsHRvxyj2XMKKs4aZa7/GEBbT5qDvKXdJp62FTEuPO0UdgoFmNwMG6Z5IkmWfuKzVQEfOSpgGwhB8kMXbGZFJCM1cReNswqFBBC7CnzAKvs/cAdlbwG3gjOp6lD0nSxDbcg+yThQBumCVu X-M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sqx4K5TLwU8Xr6L5GbUF7wafT9f4QTy2dSw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(148574349560750); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1985; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 4:Qpj7xKEKOH35SmiYfssihT+sdTb13belL7cB9uhM?= =?us-ascii?Q?UDw26vFyaXEhQSBy8RfRroY8bHLC3w2Q0tzjNOMPdQQmQoAnm55wqVKgto3m?= =?us-ascii?Q?ZJMKWIsnxBSPLuClDb6l9pHLKbAQNn4jb42t+NGufUarIYO1qHrvR7iJWuv5?= =?us-ascii?Q?EHm4sD+BjHyM+liPqrkqMQn8kdbnqq9FO1giiq+tHp2/tSU98Z+pkWmao8b5?= =?us-ascii?Q?95ef9GNo4LWEBOTc4DsQPT6v8wJdRdDzt/v1qkkfVRHHTmkPF19Kvadag2fy?= =?us-ascii?Q?nn7SdzZ0qiUoXRiYTYLzA983FqcdeHzJsnAgKguCPpy2DoyhGDTYCGFh6tV0?= =?us-ascii?Q?ze/dQopYOYYSkz4M43jwg/tYlRp8/dqDchFd4gzmUG0XXm+PIFnI/wN1Xw7t?= =?us-ascii?Q?wblj6F9Flfzm0sF4+3n2Ko3fs9ZN4xeUJKZS+NDBU9LJRslU4YwrZihAIS5s?= =?us-ascii?Q?eJ5Y4DqMr/16gn44dRU/sZ6j4YCrrmCwiK/UbsRS1X5Up5VDvS2HxacrTQ26?= =?us-ascii?Q?IB92Tk2BYmZn4Y9z4CX3F3eC9fjBPPMcI3w7Yt1RJFUBL9LOzl3qoXAqJ+sm?= =?us-ascii?Q?XfOg0q+QiMkB57Mue7BdAcIVLgyVXcGdXDNaMR+Np1AVudlOnSC5Mda8xvp1?= =?us-ascii?Q?cVDeC+jHzayAwZ3LyWAC79D0PV/BG4fZeormQ9Fry2cxxP2UM1Koqzj08YuG?= =?us-ascii?Q?blagkM4Hy6+BFNXgP/x93fo61974Yy5AsWNCPrLjzrsZ0L7oel248Yl1LX7p?= =?us-ascii?Q?n/VNGl4J8JN2jrqHDng22wZdY4OoNSy1JbKnNawJxSbsfz6A20/r5AUsDYnI?= =?us-ascii?Q?ACuQ+fOAY7OyzB4H/q5aE1F8XhFgb3YBYCKMWZcZHkTzu0vfEVu4ROMU2WRj?= =?us-ascii?Q?DCcqeg8/BJ9LEfOkZKkX2251slwVKPpvdHbLGRQAZZH5SGGL2JpJi8FMVwx/?= =?us-ascii?Q?vo0goy9opW377P7aFFAw5nUijZk1xdC/bEtx9x4ixkC5mR1eWsHnh0XO4VmO?= =?us-ascii?Q?L00oG/w7uG60Dbllpeh2lyfwmdFWdysewfo+9eeqIVhUYWTq7A6TXx+WF9Zj?= =?us-ascii?Q?PgIJpEQ94qHfN2RRCMd9Hq6CD85bKk+XVRzSEUWNuU/s437yHjyiPhW+yYoo?= =?us-ascii?Q?iKMuvRzY1DhJ6a7UFq6vfq8hOvXEF/sg3mRNPLyMOTgjXZY9ALrFyC90ZNvy?= =?us-ascii?Q?N6z3BKBhlAex60mURGOi7cYu7z1XLQ8qXvjJUg3e7+s71MP//jcNH1BDKvVq?= =?us-ascii?Q?tmm/dyM33r77gl6RHAk=3D?= X-Forefront-PRVS: 03607C04F0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39400400002)(39840400002)(39410400002)(81166006)(8676002)(36756003)(230783001)(2351001)(50226002)(575784001)(25786009)(86362001)(50466002)(305945005)(478600001)(48376002)(5660300001)(189998001)(6116002)(5003940100001)(3846002)(7736002)(4326008)(107886003)(38730400002)(66066001)(110136004)(47776003)(2950100002)(53936002)(6666003)(76176999)(6506006)(6512007)(2361001)(6916009)(33646002)(50986999)(42186005)(6486002)(2906002)(53416004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1985; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 23:rU1Ugfq6z6bfpg/m1aQLERaPmk/KBq/5WuIr7aj?= =?us-ascii?Q?FRBt8DUVeOgJ3g8r5kISM9iktllxjyVW53iBWWq19MgzWGLW9IN7W9grBRW0?= =?us-ascii?Q?TEf0d/n45nBxkeDu1nuuD/nXjYSDYtjLR5wzWG3OmjWTGgWvkEho/jKQRNcK?= =?us-ascii?Q?TBfd+uL/bNkvXdgBr8jQUPdI/rIelJ08QQv2Crl40kCivKNGS8VbHHyU0WBw?= =?us-ascii?Q?23oi//gcVN2DjBTtcrRuMgg5fgYZyBB0GopAXPOpFmSP5Kg1LXGkvCaHF5bw?= =?us-ascii?Q?HAd7u6KK7QcfzMyXIaNY6LeVLMiwPdiSqpzg82+CuZbEUWllkTV4llVcscbg?= =?us-ascii?Q?tIx54GD26bhma6ZhXjx7mZPcI/FEXYj/MyTMAhjlXP4poG/sTSXcEZGFN8sz?= =?us-ascii?Q?+Om9WdHtVbc7GmVnOJopOzock2f66fxY3D+Ai1blJHajmWbPWqxUMU4O5/q3?= =?us-ascii?Q?te+HxszH0e0xYQOLGnayEuo6idNl0CMa47j2dB4fsn1eAuB6I1hr84YsXj0c?= =?us-ascii?Q?QQEmQExCX5MmWbagDM39I1OAhPc4vUViXyVjoU7Rx+59uISRxB6jeVLtR9/z?= =?us-ascii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DQ1cALq7tMoIW+bt9SZ3PZbTZYnru1Qvcl0fIXe1Kf7wCG424hTwZykQKnRoVcG5zfLohpVQTlfmHiDIa4FaehAaUY914jkZ83oKgkhrk9r0To1oPq10LpkrIcrzjVafNt2Cz5KVzozFrN4hg45DpDAbMSZ/ACCBaynRYYnDHCEJ6X844fYhOB4ZUsJzFLrW/WgmYfvm/h9xHpe9huuU+CJ/XfybKQaBgTrQzp2vCiaKfG5IWB2UfCLkLSTBXKiqP3wF3y2gNQgV5hsXVdCI1D84EyiwqNFnHnR5ztM/qHwBwIJsEX5lIlwQ1Fikr88FCO0= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 20:cpv/i9bKJ+g2Ub6HVhv7TvjktT9BCeIe4nyf+9q9RTWy0yAHu5fdH+KtpkvFxmu7ykMXCF0WqpNCTh3g8NWQxopTv24qRb5ZQVj02IFT4quylMU20fkTsYOjLzO4KQzEl+Z3/hSW3FqDdZxSA9qp9yCCsUK5hqEfjZAyAL5/a50= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 12:10:23.4795 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1985 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.101 Subject: [Qemu-devel] [PATCH v6 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: Anton Nefedov , den@virtuozzo.com, amit@kernel.org, mst@redhat.com, marcandre.lureau@redhat.com, pbonzini@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 Acked-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau --- 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 214b261..1ff4552 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_chardev_send_break(Monitor *mon, const QDict *qdict); void hmp_qemu_io(Monitor *mon, const QDict *qdict); diff --git a/chardev/char.c b/chardev/char.c index d6b9d89..c34b44a 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 275ccdf..c4c96db 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 dee4028..1b443e1 100644 --- a/hmp.c +++ b/hmp.c @@ -2228,6 +2228,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 6dfa0c3..d77b3c8 100644 --- a/tests/test-hmp.c +++ b/tests/test-hmp.c @@ -23,6 +23,7 @@ static const char *hmp_cmds[] = { "boot_set ndc", "chardev-add null,id=testchardev1", "chardev-send-break testchardev2", + "chardev-change testchardev1 ringbuf", "chardev-remove testchardev1", "commit all", "cpu-add 1",