From cb646aa4481e18b6d026d8343f348fa6b4004c20 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 1 May 2020 21:52:19 +0200 Subject: kamikaze-fsck: make debugfs usable for more than one to-be-cleared inode --- kamikaze-fsck | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kamikaze-fsck b/kamikaze-fsck index 1eb3e4e..699f4ab 100755 --- a/kamikaze-fsck +++ b/kamikaze-fsck @@ -29,7 +29,11 @@ touch "${tmp_dir}/faulty-inode" while [ -f "${tmp_dir}/faulty-inode" ]; do if [ -s "${tmp_dir}/faulty-inode" ]; then >&2 date - debugfs -w "$1" -R "$(uniq < "${tmp_dir}/faulty-inode")" + uniq \ + <"${tmp_dir}/faulty-inode" \ + | while read -r s; do + debugfs -w "$1" -R "${s}" + done fi >&2 date rm "${tmp_dir}/faulty-inode" -- cgit v1.2.3-70-g09d2