summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-05-01 21:52:19 +0200
committerErich Eckner <git@eckner.net>2020-05-01 21:52:19 +0200
commitcb646aa4481e18b6d026d8343f348fa6b4004c20 (patch)
tree3b82f2aa7f18587ea76f6f88fbcbee7e35146b1d
parentffaecceaa0ae889c9bfb2d3c876578c622d782b0 (diff)
downloadkamikaze-fsck-cb646aa4481e18b6d026d8343f348fa6b4004c20.tar.xz
kamikaze-fsck: make debugfs usable for more than one to-be-cleared inode
-rwxr-xr-xkamikaze-fsck6
1 files changed, 5 insertions, 1 deletions
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"