From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <harry.van.haaren@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 07A505938
 for <dev@dpdk.org>; Fri, 30 Oct 2015 15:18:24 +0100 (CET)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga103.fm.intel.com with ESMTP; 30 Oct 2015 07:18:05 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.20,218,1444719600"; d="scan'208";a="807513008"
Received: from sie-lab-212-222.ir.intel.com (HELO
 silpixa00366884.ir.intel.com) ([10.237.212.222])
 by orsmga001.jf.intel.com with ESMTP; 30 Oct 2015 07:18:04 -0700
From: Harry van Haaren <harry.van.haaren@intel.com>
To: dev@dpdk.org
Date: Fri, 30 Oct 2015 14:17:58 +0000
Message-Id: <1446214678-18527-1-git-send-email-harry.van.haaren@intel.com>
X-Mailer: git-send-email 1.9.1
In-Reply-To: <1446206979-17430-1-git-send-email-harry.van.haaren@intel.com>
References: <1446206979-17430-1-git-send-email-harry.van.haaren@intel.com>
Subject: [dpdk-dev] [PATCH v2] tools/dpdk_nic_bind.py: alias -s to --status
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2015 14:18:25 -0000

This patch adds -s as an alias to --status in dpdk_nic_bind.py,
providing a convienient shorthand.

v2:
- Corrected --summary to --status
- Fixed bug regarding -u usage (Thanks Ferruh Yigit for suggested fix)

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 tools/dpdk_nic_bind.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py
index b7bd877..f02454e 100755
--- a/tools/dpdk_nic_bind.py
+++ b/tools/dpdk_nic_bind.py
@@ -68,7 +68,7 @@ Options:
     --help, --usage:
         Display usage information and quit
 
-    --status:
+    -s, --status:
         Print the current status of all known network interfaces.
         For each device, it displays the PCI domain, bus, slot and function,
         along with a text description of the device. Depending upon whether the
@@ -477,7 +477,7 @@ def parse_args():
         sys.exit(0)
 
     try:
-        opts, args = getopt.getopt(sys.argv[1:], "b:u",
+        opts, args = getopt.getopt(sys.argv[1:], "b:us",
                                ["help", "usage", "status", "force",
                                 "bind=", "unbind"])
     except getopt.GetoptError, error:
@@ -489,7 +489,7 @@ def parse_args():
         if opt == "--help" or opt == "--usage":
             usage()
             sys.exit(0)
-        if opt == "--status":
+        if opt == "--status" or opt == "-s":
             status_flag = True
         if opt == "--force":
             force_flag = True
-- 
1.9.1