Whamcloud - gitweb
LU-14468 utils: improve 'lfs rmfid' error messages
authorJohn L. Hammond <jhammond@whamcloud.com>
Tue, 23 Feb 2021 15:40:08 +0000 (09:40 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 5 May 2021 19:02:05 +0000 (19:02 +0000)
commit9b19bb7edbb5029e53e56c24bfbcb2b11deb1200
tree424bd545ebbd891f9a5df2b077ad42fc0ba85584
parent75c3ef0cc98017dd114f1b5a23fed1ef18d8664b
LU-14468 utils: improve 'lfs rmfid' error messages

In lfs_rmfid_and_show_errors(), convert the error messages printed by
'lfs rmfid' from the format
  rmfid([0x20001a9f5:0x159:0x0]): rc = -39
to
  lfs rmfid: cannot remove [0x20001a9f5:0x155:0x0]: Directory not empty

Simplify the logic and swap rc and rc2 to follow conventions.

Lustre-commit: 6560ae08a788b3779118640837f68b499a99ee8c
Lustre-change: https://review.whamcloud.com/41727

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Iccd9e1054ed8842fc4f65dd601077cfdeaa1320c
Reviewed-on: https://review.whamcloud.com/41727
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/43452
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/utils/lfs.c