nfsiostat: normalize the mountpoints passed in from the command line
Subsystems (2)
PATCH 1/1 nfsiostat: normalize the mountpoints passed in from the command line
If the mountpoint passed in from the command line contains a trailing '/' character, then nfsiostat winds up printing statistics for all mounts instead of printing statistics for the specific mount that was requested.
Signed-off-by Scott Mayhew <[email protected]>
--- tools/nfs-iostat/nfs-iostat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/nfs-iostat/nfs-iostat.py +2 -2
@@ -589,8 +589,8 @@ client are listed. (options, args) = parser.parse_args(sys.argv) for arg in args[1:]: - if arg in mountstats: - origdevices += [arg] + if os.path.normpath(arg) in mountstats: + origdevices += [os.path.normpath(arg)] elif not interval_seen: try: interval = int(arg)
Signature · 1 line
2.52.0
Quoted 6 lines · Scott Mayhew
If the mountpoint passed in from the command line contains a trailing '/' character, then nfsiostat winds up printing statistics for all mounts instead of printing statistics for the specific mount that was requested.
Signed-off-by Scott Mayhew <[email protected]>
Committed... (tag: nfs-utils-2-8-5-rc2)
steved.
Quoted 19 lines
--- tools/nfs-iostat/nfs-iostat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/nfs-iostat/nfs-iostat.py +2
-2@@ -589,8 +589,8 @@ client are listed. (options, args) = parser.parse_args(sys.argv) for arg in args[1:]: - if arg in mountstats: - origdevices += [arg] + if os.path.normpath(arg) in mountstats: + origdevices += [os.path.normpath(arg)] elif not interval_seen: try: interval = int(arg)