From patchwork Mon Jul 17 10:52:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9844693 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 5080E6037F for ; Mon, 17 Jul 2017 10:56:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 421E02844E for ; Mon, 17 Jul 2017 10:56:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3690C2842E; Mon, 17 Jul 2017 10:56:02 +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 9D8F527E63 for ; Mon, 17 Jul 2017 10:56:00 +0000 (UTC) Received: from localhost ([::1]:49359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX3h1-0004Hg-HM for patchwork-qemu-devel@patchwork.kernel.org; Mon, 17 Jul 2017 06:55:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX3e8-0002Li-Eu for qemu-devel@nongnu.org; Mon, 17 Jul 2017 06:53:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX3e5-0007n1-Qf for qemu-devel@nongnu.org; Mon, 17 Jul 2017 06:53:00 -0400 Received: from mail-eopbgr50115.outbound.protection.outlook.com ([40.107.5.115]:36552 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 1dX3e4-0007kn-VP for qemu-devel@nongnu.org; Mon, 17 Jul 2017 06:52:57 -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=G3IXqtuUG2BGa8NuuO1lwRu0CuF44Dpfi5qEYdZ20Ag=; b=RJ8Z76nfG3ODbkLSIGBFb2CV2Ch6ulDkzCEeaAfmn1RH6a0KCn97YA8p7FV4ZRSuhFnzBYb/pQW49eY88grPL+HIOdIAP4tcIPv9ezB7gBWqtR0tXcwGu8KOpOQXVsuliov+gXqmCgSlFp9YOXv3AmW67pLhtmtmgIYWR1oKVKg= 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 VI1PR0801MB1997.eurprd08.prod.outlook.com (2603:10a6:800:8a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Mon, 17 Jul 2017 10:52:45 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 17 Jul 2017 13:52:35 +0300 Message-Id: <1500288755-76809-1-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR0201CA0014.eurprd02.prod.outlook.com (2603:10a6:4:3f::24) To VI1PR0801MB1997.eurprd08.prod.outlook.com (2603:10a6:800:8a::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab264199-9e0e-40d6-48f0-08d4cd01f59b 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:VI1PR0801MB1997; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1997; 3:A6C9FwCDR6qLcCyKYADbFIAK62yvBxApBvI7B9Yk7nJi3YE3TAkfBgdqj5LUAFP3FSTn3vNzaayOaeiB4vAmWl6PaGamJ/4qhQ/vmf8INmWNHR/Hj+bLE2Gw/X7ykmoeOXz94RCWDOX5YjbGldGdwhcs2f3TRSlMP77eeS/kRaP3Xxucf8/xUX53Mdsi3Ncn1APQcJHaKngwcdmZGJObdqaPnaveJNfzLCJCMQ7a8eUPsi9ocY3Vls0c83o9c7qbU2T57RUw2WcJtjpFlqf4KeBgm9AIgczriEVhQZXaMLIhV26gE2Sc1MSlP7UYrT9KQdaI3vr14DBIIThw5WwfY1goqR9mZ9wGROnYqu4nXPmmgtguPsaFRai6VisJ3ovwR4pJI6QtbzZ+FtEHkXuuBhIXocMQ695M+h5z1r/GFaGeBgMSpxWzVVvlrx86lQ80sU0mwWLLUppWBntY0vLs+zEsjuLoYfv6uSsGn2DwKv0rPDQ8jCvIomO/w3ClorFuDJrgogCjmuNq3x3XcK9gZWGTejBmxOjHtPm5EKSK8KWYTQKQjcQ/EjuPj18uIlaxaCYAJygDWiObDUcwufzjz0P19OKi/wSb+vo5EAH/TP9SQhl0d+tcJTnfp+Qy246BVSg3fm5864X4BFZFQbxe4TZ1L203xbs4nJ1Rc7DWEvD2ryRnc7EqQ3S57mFurJECRbCOdzzkU6TXGxb3l7x6LnJhDALTC5YzRkYiHzaF27A= X-MS-TrafficTypeDiagnostic: VI1PR0801MB1997: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1997; 25:Rfxvh61UbQ6u2zmGT1FRBvP+TDQlXq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-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(2017060910075)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0801MB1997; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0801MB1997; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1997; 4:qFJzLpnpC23K+bb2HWOJEmB/g9W+wiANwmNE/+9Z?= =?us-ascii?Q?gb2yrOfI3maN4u6VVLfFsozyYdRKnO3KPPaZkK7PH5tJzAzxFK/0WrN8azhQ?= =?us-ascii?Q?qiJ/isBqxens4K8907KzhaEpc8IzXuXqvwbICVl19opkXbsWsQI+YtjzN4w4?= =?us-ascii?Q?uuJ2dHECoXdeGztENUkrf7gJeiW+2JL4M8Ot/28iqwNveEc0Z5w8rVgyJ9+W?= =?us-ascii?Q?WB1+8WferknypxW58H00qosfipVHXWrvAqvF6EXjVXEpuYujdmAuEcqP6MXE?= =?us-ascii?Q?eYwBVhypxGTDUOMG1rdeMz83y4TU+vWl3aeXjDzQn2Te0a+xd3rDTeB/ZSaP?= =?us-ascii?Q?CsAwZwVC1ItgFbuICMdZVfL92iVbakkXH6xX5fWZG0zWIID8Y5xYGt8HEXjM?= =?us-ascii?Q?YqCmd3WfCDRxe0n4LhXNaolHXBwzgOwbjXy0Gtz0ibkR+W3hqXw/20dbS2vA?= =?us-ascii?Q?NYInmD2kQcXAF4TU+bVXQOH11QPB/kTeCFu0Lwes4w+dkOZXnrv/aa9nW4tR?= =?us-ascii?Q?9gBtXJ7PA3TnCZTsVnGlZjaNNW7yHqku7Tkg7zFj/nzqd2wI/aShPlTVzufG?= =?us-ascii?Q?YeA0zh9PFU2xcH583TErDextmUBLWbyF064D01l7pPGhPX1DIMIWwBNnHw2v?= =?us-ascii?Q?PrsNaalzL9LrVHfbQKeN1jCYmKCUR0wk01iEFmGQaRBqk/z9cyfWa+4G+5UB?= =?us-ascii?Q?FmVLj6k6221BSRYIhktaFllfh6GNdDVv59Fwnhyfs2ig2q0UxeBaqMrk9+iL?= =?us-ascii?Q?JTgCLdmAMuLASiE3asebdvhMvzpU79tAM6W911sgNp+sknBSkRGMFJ5N0hPC?= =?us-ascii?Q?LD7ASqNh8quhXT4I0y+1S9WaTk4g/6LVXQxHk3nU4tt6+2DTkZPCmPAKs0H0?= =?us-ascii?Q?WXDTP9+FPoewSysQkY831U1rXqFxbBMPlhrD6LbSxgJJkz5Dskk+YgBHPE9N?= =?us-ascii?Q?IfN5XqHUQ52cGdiF5jtoFtrNhTt/JBon8gV1xz1Ut6VHCOo7IVYcxV19v5S+?= =?us-ascii?Q?eGF6XJ42Hsr/vH1/KGDwlSd4YA6RKGY1Ebmf0SiJciUZnxsCQDPnBsx1uZDJ?= =?us-ascii?Q?LWH2EwQQ6EA7Lpwvjzh5C+1/+VXCI17WE9x4lLOvwI2I48lTg59pdgn1OSkB?= =?us-ascii?Q?cGbgjPh7qnzSVg6zc/Ce4JosksXb5nrc5Wr4yHK8I58z2eIvwwn4F4r20cqg?= =?us-ascii?Q?mcVnrRe9DNSZfej9DBqjiZ816dxTVjbofLFdsvjHtBcELDOsjuhko9lKqw?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0371762FE7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(7370300001)(4630300001)(6009001)(39400400002)(39830400002)(39410400002)(39450400003)(5660300001)(6116002)(3846002)(6666003)(6486002)(478600001)(48376002)(6506006)(50466002)(7736002)(305945005)(6916009)(2906002)(50226002)(86362001)(8676002)(81166006)(53936002)(2361001)(47776003)(66066001)(42186005)(33646002)(38730400002)(7350300001)(2351001)(110136004)(107886003)(6512007)(4326008)(5003940100001)(50986999)(189998001)(25786009)(53416004)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1997; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1997; 23:a+Q6WfUawDgQY4xcvnQp+JHz/P0udce+QIsWFS0?= =?us-ascii?Q?rzCVmRFqZUKw9DM41TUNBordAhMlheuN46DB2R2MKeKKtGy4nOpi4kq3UEqk?= =?us-ascii?Q?R+fxsBSGFWHVaRhn+CV+pYJrwET8EXYb60v1m2D0fN3OFCoZEn8TGnJGVB9d?= =?us-ascii?Q?vLM/dfERTRELGPtgLRkZcGiWtpSnbhtsxq33XT/ApsEfNIVodN5oxr9oOMqQ?= =?us-ascii?Q?7V66dbRsDnGKnjN3tBf8VFMM2Ot9/M95j8V3Jp8TpaboTyyae/aTnzPnDR6Z?= =?us-ascii?Q?3KDG+qt34pCEc9bh9Hq3LIze+ncFoOJRpjUY3ss1hWBxSh7ISmFW9LfGnnC+?= =?us-ascii?Q?sY35NYWOJShp4FnAt+pCmQyNw6ywAUwv6oKYDgcYgVN52t2MOTdfZ0Tk4crU?= =?us-ascii?Q?aQ8gBZDNs7HfdNdWEqg4bIJ65P6VICCS6Dea+lSZPWkJSCK3miUkUYLW1slO?= =?us-ascii?Q?MV2ufFDfru0zyfIIzWzjhiNME7HlrNLgqyDxoEVmTrbp3ltfnqMPZmr2d60J?= =?us-ascii?Q?g26lOExjHEQ6IjL/+0uZOjwvHhFAfMgN3GC1WkEGqNas5z+02+w5BvuCyV+V?= =?us-ascii?Q?JJOVOvy7oMluSUMQky8yIVQrv/TFktBBKq1JVLylfGwdr898attmzP5r8NK9?= =?us-ascii?Q?wi2pqGTLYdIka1UBfDhaqbNOrEvJtUj58+p7UHQ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RFhTOEixanFEEp8twlxW5I59YuLZ6+nKpAEn+c+Bq44H8jJWyKPCJ8F7KY9m6XLsiaWK7xuJN4mHrZ6YVUOJTrmTp6Ttx+ATQH/QviP1WcWvR8L51wQmv7MwNDftFxbYiopfny6xSzfBfaZFsIxnRutgYMYlhPGINM8b/Nrk= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1997; 20:5f4kOZvpc6XhY/Oj9SXv6mT5YkEkK0P0aD9KBUPgX970x5nt9bZdxycd28oVY/9cdjvbw/cb+oa9S+Lb88m7KIGlBuTMX5kkuTGsyENGOhGRfzOO5cp6qNakxHLNg6zlLx60z+bSaJfRha26T84qOP3QbmsfsocogHojwCSwhjc= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2017 10:52:45.7213 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1997 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.5.115 Subject: [Qemu-devel] [PATCH] char: don't exit on hmp 'chardev-add help' 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, dgilbert@redhat.com, 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 qemu_chr_new_from_opts() is used from both vl.c and hmp, and it is quite confusing to see qemu suddenly exit after receiving a help option in hmp. Create a separate function for printing help and let different callers react accordingly. Signed-off-by: Anton Nefedov --- include/chardev/char.h | 9 +++++++++ chardev/char.c | 27 +++++++++++++++++++-------- vl.c | 4 ++++ 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/include/chardev/char.h b/include/chardev/char.h index 1604ea9..461962b 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -59,6 +59,15 @@ struct Chardev { }; /** + * @qemu_chr_help: + * + * Print available chardevice backends if 'asked for help' in @opts + * + * Returns: true if there was a help option + */ +bool qemu_chr_help(QemuOpts *opts); + +/** * @qemu_chr_new_from_opts: * * Create a new character backend from a QemuOpts list. diff --git a/chardev/char.c b/chardev/char.c index c34b44a..19833fe 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -604,14 +604,9 @@ ChardevBackend *qemu_chr_parse_opts(QemuOpts *opts, Error **errp) return backend; } -Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) +bool qemu_chr_help(QemuOpts *opts) { - const ChardevClass *cc; - Chardev *chr = NULL; - ChardevBackend *backend = NULL; - const char *name = chardev_alias_translate(qemu_opt_get(opts, "backend")); - const char *id = qemu_opts_id(opts); - char *bid = NULL; + const char *name = qemu_opt_get(opts, "backend"); if (name && is_help_option(name)) { GString *str = g_string_new(""); @@ -620,7 +615,23 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) error_report("Available chardev backend types: %s", str->str); g_string_free(str, true); - exit(0); + return true; + } + + return false; +} + +Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp) +{ + const ChardevClass *cc; + Chardev *chr = NULL; + ChardevBackend *backend = NULL; + const char *name = chardev_alias_translate(qemu_opt_get(opts, "backend")); + const char *id = qemu_opts_id(opts); + char *bid = NULL; + + if (qemu_chr_help(opts)) { + return NULL; } if (id == NULL) { diff --git a/vl.c b/vl.c index fb6b2ef..7cad539 100644 --- a/vl.c +++ b/vl.c @@ -2344,6 +2344,10 @@ static int chardev_init_func(void *opaque, QemuOpts *opts, Error **errp) { Error *local_err = NULL; + if (qemu_chr_help(opts)) { + exit(0); + } + qemu_chr_new_from_opts(opts, &local_err); if (local_err) { error_report_err(local_err);