Whamcloud - gitweb
LU-13705 utils: fix llstat -n option 89/49289/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 1 Dec 2022 00:04:26 +0000 (17:04 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Dec 2022 16:09:52 +0000 (16:09 +0000)
The '-n' option was not configured as a valid option for getopt
and would return an error if specified, instead of limiting the
number of stats outputs as it should.

Test-Parameters: trivial
Fixes: 3e0d994fbf4c ("LU-13705 utils: improve llstat/llobdstat usability")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ifacafce741854fe12b80ced28e95bc7cc9254035
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49289
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/llstat

index 29db880..4d7b249 100755 (executable)
@@ -46,7 +46,7 @@ my $ONE_MB = 1048576;
 
 # Command line parameter parsing
 use Getopt::Std;
-getopts('cdghi:w:') or usage();
+getopts('cdghi:n:w:') or usage();
 usage() if $opt_h;
 $clear = 1 if $opt_c;
 $debug = $opt_d if $opt_d;