diff --git a/src/vol/salvaged.c b/src/vol/salvaged.c index bb6de65391..54c4a635b9 100644 --- a/src/vol/salvaged.c +++ b/src/vol/salvaged.c @@ -211,11 +211,13 @@ handleit(struct cmd_syndesc *opts, void *arock) cmd_OptionAsFlag(opts, OPT_salvagedirs, &RebuildDirs); cmd_OptionAsFlag(opts, OPT_blockreads, &forceR); if (cmd_OptionAsString(opts, OPT_parallel, &optstring) == 0) { + char *input = optstring; if (strncmp(optstring, "all", 3) == 0) { PartsPerDisk = 1; + input += 3; } - if (strlen(optstring) != 0) { - Parallel = atoi(optstring); + if (strlen(input) != 0) { + Parallel = atoi(input); if (Parallel < 1) Parallel = 1; if (Parallel > MAXPARALLEL) {