Many files:
Change the progress function to return an integer; if returns 1, then
the progress function is expected to have set the e2fsck context flag
signalling a user abort, and the caller should also initiate a user
abort.
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index 38d4424..1507a97 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -117,7 +117,7 @@
cd.pctx.errcode = ext2fs_dblist_iterate(fs->dblist, check_dir_block,
&cd);
- if (ctx->flags & E2F_FLAG_ABORT)
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
return;
if (cd.pctx.errcode) {
fix_problem(ctx, PR_2_DBLIST_ITERATE, &cd.pctx);
@@ -286,7 +286,8 @@
ctx = cd->ctx;
if (ctx->progress)
- (ctx->progress)(ctx, 2, cd->count++, cd->max);
+ if ((ctx->progress)(ctx, 2, cd->count++, cd->max))
+ return DIRENT_ABORT;
/*
* Make sure the inode is still in use (could have been
@@ -452,7 +453,7 @@
dir_modified++;
goto next;
}
- if (ctx->flags & E2F_FLAG_ABORT)
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
return DIRENT_ABORT;
}
@@ -614,7 +615,7 @@
if (problem) {
if (fix_problem(ctx, problem, &pctx)) {
deallocate_inode(ctx, ino, 0);
- if (ctx->flags & E2F_FLAG_ABORT)
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
return 0;
return 1;
}