Message ID | 20250121190315.1498852-1-sorenson@redhat.com (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | [nfs-utils] nfsiostat: skip argv[0] when parsing command-line | expand |
On 1/21/25 2:03 PM, Frank Sorenson wrote: > Just skip argv[0] entirely while looping through the command-line > arguments. > > Signed-off-by: Frank Sorenson <sorenson@redhat.com> Committed... (tag: nfs-utils-2-8-3-rc4) steved. > --- > 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:
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:
Just skip argv[0] entirely while looping through the command-line arguments. Signed-off-by: Frank Sorenson <sorenson@redhat.com> --- tools/nfs-iostat/nfs-iostat.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)