Whamcloud - gitweb
LU-17000 lnet: Correctly handle args passed to jt_show_fault() 51/55651/4
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Sun, 7 Jul 2024 01:17:26 +0000 (21:17 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 13 Jul 2024 20:58:25 +0000 (20:58 +0000)
commit0359455f8a98f960f7b822e8f5468d94f437d93b
tree83d558b97ee0f6077ac1d6db7a170da9c3cd60fe
parent7e9f2e6914cfd8bd344cc205d0edfd6c4427e29b
LU-17000 lnet: Correctly handle args passed to jt_show_fault()

Remove 'return 0' from jt_show_fault() args processing
default case and instead set rc to -EINVAL. This correctly
takes care of bad args passed. Eg: 'lnetctl fault show -x delay'
or 'lnetctl fault show -t'. The 'rc' check deemed unnecessary
by coverity now becomes legit.

Test-Parameters: trivial testlist=sanity-lnet
CoverityID: 429592 ("Logically dead code")
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Id1dc52218405dbd094a7e8304aafeff57b46ab79
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55651
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/utils/lnetctl.c