[dpdk-dev] tools/dpdk_nic_bind.py: alias -s to --summary

Message ID 1446206979-17430-1-git-send-email-harry.van.haaren@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Van Haaren, Harry Oct. 30, 2015, 12:09 p.m. UTC
  This patch adds -s as an alias to --summary in dpdk_nic_bind.py,
providing a convienient shorthand.

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

Comments

Panu Matilainen Oct. 30, 2015, 1:46 p.m. UTC | #1
On 10/30/2015 02:09 PM, Harry van Haaren wrote:
> This patch adds -s as an alias to --summary in dpdk_nic_bind.py,
> providing a convienient shorthand.

The patch is about adding an alias to --status, but the summary talks 
about --summary. And I nearly did the same when writing this :)

	- Panu -
  

Patch

diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py
index b7bd877..64f61d1 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:u:s",
                                ["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