Whamcloud - gitweb
LU-8465 e2fsck: merge counts after threads finish
[tools/e2fsprogs.git] / e2fsck / unix.c
index 02a1fd2..acbc8f7 100644 (file)
@@ -82,7 +82,9 @@ static void usage(e2fsck_t ctx)
 
        fprintf(stderr, "%s", _("\nEmergency help:\n"
                " -p                   Automatic repair (no questions)\n"
+#ifdef CONFIG_PFSCK
                " -m                   multiple threads to speedup fsck\n"
+#endif
                " -n                   Make no changes to the filesystem\n"
                " -y                   Assume \"yes\" to all questions\n"
                " -c                   Check for bad blocks and add them to the badblock list\n"
@@ -947,7 +949,11 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
        ctx->readahead_kb = ~0ULL;
        ctx->inode_badness_threshold = BADNESS_THRESHOLD;
 
+#ifdef CONFIG_PFSCK
        while ((c = getopt(argc, argv, "pamnyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDkz:")) != EOF)
+#else
+       while ((c = getopt(argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDkz:")) != EOF)
+#endif
                switch (c) {
                case 'C':
                        ctx->progress = e2fsck_update_progress;
@@ -988,9 +994,11 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
                        }
                        ctx->options |= E2F_OPT_PREEN;
                        break;
+#ifdef CONFIG_PFSCK
                case 'm':
                        ctx->options |= E2F_OPT_MULTITHREAD;
                        break;
+#endif
                case 'n':
                        if (ctx->options & (E2F_OPT_YES|E2F_OPT_PREEN))
                                goto conflict_opt;
@@ -1109,6 +1117,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
                        _("The -n and -l/-L options are incompatible."));
                fatal_error(ctx, 0);
        }
+#ifdef CONFIG_PFSCK
        if (ctx->options & E2F_OPT_MULTITHREAD) {
                if ((ctx->options & (E2F_OPT_YES|E2F_OPT_NO|E2F_OPT_PREEN)) == 0) {
                        com_err(ctx->program_name, 0, "%s",
@@ -1121,6 +1130,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
                        fatal_error(ctx, 0);
                }
        }
+#endif
        if (ctx->options & E2F_OPT_NO)
                ctx->options |= E2F_OPT_READONLY;