From patchwork Tue Oct 7 15:16:08 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick McHardy X-Patchwork-Id: 3182 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 8BABEDDE00 for ; Wed, 8 Oct 2008 02:16:24 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752615AbYJGPQT (ORCPT ); Tue, 7 Oct 2008 11:16:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752129AbYJGPQT (ORCPT ); Tue, 7 Oct 2008 11:16:19 -0400 Received: from stinky.trash.net ([213.144.137.162]:48918 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751951AbYJGPQS (ORCPT ); Tue, 7 Oct 2008 11:16:18 -0400 Received: from [192.168.0.100] (unknown [78.42.204.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by stinky.trash.net (Postfix) with ESMTP id 66F3C94BE0; Tue, 7 Oct 2008 17:16:16 +0200 (MEST) Message-ID: <48EB7D38.1030503@trash.net> Date: Tue, 07 Oct 2008 17:16:08 +0200 From: Patrick McHardy User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Linux Netdev List , Stephen Hemminger Subject: [IPROUTE]: Support "ip link add help" for rtnl_link API Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org commit 91cb1e34144e62c0a9e767d1a766c1827d79f770 Author: Patrick McHardy Date: Tue Oct 7 16:47:03 2008 +0200 [IPROUTE]: Support "ip link add help" for rtnl_link API For some reason "ip link add help" is currently not supported when using the new rtnl_link API. Fix that. Signed-off-by: Patrick McHardy diff --git a/ip/iplink.c b/ip/iplink.c index f4cbeb3..81122ae 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -274,6 +274,8 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req, if (strcmp(*argv, "dev") == 0) { NEXT_ARG(); } + if (matches(*argv, "help") == 0) + usage(); if (*dev) duparg2("dev", *argv); *dev = *argv;