mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
salvaged: Fix "-parallel all<number>" parsing
In salavageserver -parallel option takes "all<number>" argument. However the code does not parse the numeric part correctly. Due to this, only single instance of salvageserver process was running even if we provide the larger number with "all" argument. With this fix, numeric part of "all" argument will be parsed correctly and will start required number of salvageserver instances. Change-Id: Ib6318b1d57d04fecb84915e2dabe40930ea76499 Reviewed-on: https://gerrit.openafs.org/14201 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
790824ff74
commit
4512d04a9b
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user