From patchwork Tue Aug 1 15:57:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Liang X-Patchwork-Id: 9874903 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 D6CBA60361 for ; Tue, 1 Aug 2017 16:00:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8A3528174 for ; Tue, 1 Aug 2017 16:00:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD09F28068; Tue, 1 Aug 2017 16:00:10 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9AEB626E46 for ; Tue, 1 Aug 2017 16:00:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcZYY-0007eZ-1G; Tue, 01 Aug 2017 15:58:02 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcZYX-0007eP-JJ for xen-devel@lists.xen.org; Tue, 01 Aug 2017 15:58:01 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 63/EF-02185-805A0895; Tue, 01 Aug 2017 15:58:00 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeJIrShJLcpLzFFi42K52LJdRpdjaUO kwc2d/BZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bmK39ZCtaxVfzoOMXewPiHpYuRi0NIYDaT xITz94EcTg4WAXuJdbe/MoHYjAJlErfX7GeFsHMkbj59wgrRsJ5RYsmBM2AJNgFViUXLvjGC2 CIC4hL/Zs9iB7GZBcIk/mzvAbOFBawlXp7YygSxQFXiV9tSoHoODl4Bc4neOVkgYQkBbYkju/ eygcyXEOhjlLhzczf7BEbeBYwMqxjVi1OLylKLdE30kooy0zNKchMzc3QNDYz1clOLixPTU3M Sk4r1kvNzNzECw4EBCHYwNn5xOsQoycGkJMqr2FMfKcSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC 99LihkghwaLU9NSKtMwcYGDCpCU4eJREeONB0rzFBYm5xZnpEKlTjMYcG1av/8LE0fRhyxcmI Za8/LxUKXHeTJBSAZDSjNI8uEGwiLnEKCslzMsIdJoQT0FqUW5mCar8K0ZxDkYlYd5GkCk8mX klcPteAZ3CBHSKZGktyCkliQgpqQbG6kZ3OZap1v43o7+wyQf4PJYRubn6pKjUh7Vq0RJ9Ulk c+VsdYmZobhD6kLZSWr9P4dwsxbMcTLu+xF1u2T6d49H7b6znL0jcn2LWyBS2t/eUyqNf3rpW m9r/ThXaFHQo233mtccGyu1rHxZWf5vWYOTo9SKTP+dRdE7SS4ZiIfYz3+sSvzApsRRnJBpqM RcVJwIAcKuFZZMCAAA= X-Env-Sender: xiliang@redhat.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1501603078!77250979!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60606 invoked from network); 1 Aug 2017 15:58:00 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-11.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 1 Aug 2017 15:58:00 -0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36B2B622BF; Tue, 1 Aug 2017 15:57:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 36B2B622BF Received: from bogon.redhat.com (ovpn-12-90.pek2.redhat.com [10.72.12.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 402AD61781; Tue, 1 Aug 2017 15:57:56 +0000 (UTC) From: Xiao Liang To: wei.liu2@citrix.com Date: Tue, 1 Aug 2017 23:57:50 +0800 Message-Id: <20170801155750.22823-1-xiliang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 01 Aug 2017 15:57:58 +0000 (UTC) Cc: xiliang , ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH v2] xl: add --clear option to dmesg command X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: xiliang The manual of xl says --clear option is supported and that option worked for xm. Add that to xl now. Signed-off-by: xiliang Acked-by: Wei Liu --- tools/xl/xl_info.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c index 94bd1fd9ab..e9890ca5f2 100644 --- a/tools/xl/xl_info.c +++ b/tools/xl/xl_info.c @@ -884,8 +884,12 @@ int main_dmesg(int argc, char **argv) libxl_xen_console_reader *cr; char *line; int opt, ret = 1; + static struct option opts[] = { + {"clear", 0, 0, 'c'}, + COMMON_LONG_OPTS + }; - SWITCH_FOREACH_OPT(opt, "c", NULL, "dmesg", 0) { + SWITCH_FOREACH_OPT(opt, "c", opts, "dmesg", 0) { case 'c': clear = 1; break;