Whamcloud - gitweb
LU-14468 utils: improve 'lfs rmfid' error messages 27/41727/2
authorJohn L. Hammond <jhammond@whamcloud.com>
Tue, 23 Feb 2021 15:40:08 +0000 (09:40 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 6 Mar 2021 02:35:58 +0000 (02:35 +0000)
commit6560ae08a788b3779118640837f68b499a99ee8c
treeec647b044da7a21727dbe54db8dba07beea86dfa
parentc8b1f4d886b71e1439eb8d521f282dbdf366ec26
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.

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