[nfs-utils PATCH] nfsiostat: skip argv[0] when parsing command-line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just skip argv[0] entirely while looping through the command-line
arguments.

Signed-off-by: Frank Sorenson <sorenson@xxxxxxxxxx>
---
 tools/nfs-iostat/nfs-iostat.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
index 85294fb9..31587370 100755
--- a/tools/nfs-iostat/nfs-iostat.py
+++ b/tools/nfs-iostat/nfs-iostat.py
@@ -592,11 +592,7 @@ client are listed.
     parser.add_option_group(displaygroup)
 
     (options, args) = parser.parse_args(sys.argv)
-    for arg in args:
-
-        if arg == sys.argv[0]:
-            continue
-
+    for arg in args[1:]:
         if arg in mountstats:
             origdevices += [arg]
         elif not interval_seen:
-- 
2.47.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux