From patchwork Wed Sep 14 12:03:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schmidt X-Patchwork-Id: 9331301 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 279CB60231 for ; Wed, 14 Sep 2016 12:13:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19F6429CBC for ; Wed, 14 Sep 2016 12:13:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E6EC29D33; Wed, 14 Sep 2016 12:13:24 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAA5829CBE for ; Wed, 14 Sep 2016 12:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754281AbcINMNW (ORCPT ); Wed, 14 Sep 2016 08:13:22 -0400 Received: from proxima.lasnet.de ([78.47.171.185]:58361 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754527AbcINMNV (ORCPT ); Wed, 14 Sep 2016 08:13:21 -0400 Received: from localhost.localdomain (p2003004809255E629A8389FFFE20FF3F.dip0.t-ipconnect.de [IPv6:2003:48:925:5e62:9a83:89ff:fe20:ff3f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@sostec.de) by proxima.lasnet.de (Postfix) with ESMTPSA id 1C94AC5143; Wed, 14 Sep 2016 14:04:02 +0200 (CEST) From: Stefan Schmidt To: linux-wpan@vger.kernel.org Cc: Alexander Aring , Stefan Schmidt Subject: [PATCH wpan-tools 1/2] info: remove confusing supported commands printout Date: Wed, 14 Sep 2016 14:03:52 +0200 Message-Id: <1473854633-4391-2-git-send-email-stefan@osg.samsung.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1473854633-4391-1-git-send-email-stefan@osg.samsung.com> References: <1473854633-4391-1-git-send-email-stefan@osg.samsung.com> Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is confusing for the user as it used the raw netlink names and might not match the help output we print. If we want to query the kernel for available commands to display them we need to spent more energy to print it out understandable. Fixes #8 Signed-off-by: Stefan Schmidt --- src/info.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/info.c b/src/info.c index 69f37f9..b06093b 100644 --- a/src/info.c +++ b/src/info.c @@ -472,16 +472,6 @@ static int print_phy_handler(struct nl_msg *msg, void *arg) } } } - - if (tb_msg[NL802154_ATTR_SUPPORTED_COMMANDS]) { - struct nlattr *nl_cmd; - int rem_cmd; - - printf("Supported commands:\n"); - nla_for_each_nested(nl_cmd, tb_msg[NL802154_ATTR_SUPPORTED_COMMANDS], rem_cmd) - printf("\t* %s\n", command_name(nla_get_u32(nl_cmd))); - } - return 0; }