From: Benjamin Kaduk Date: Sun, 6 Nov 2016 21:06:02 +0000 (-0600) Subject: bos: allow salvage -salvagedirs with -all X-Git-Tag: upstream/1.6.20^2~5 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=30fbf5a5cc5dfdefa0ad64b488be22b9375e5b09;p=packages%2Fo%2Fopenafs.git bos: allow salvage -salvagedirs with -all Allow the -salvagedirs option on bos salvage when invoked with the -all option to salvage the whole server. The -salvagedirs -all options will rebuild every directory on the server. Reviewed-on: https://gerrit.openafs.org/12457 Reviewed-by: Mark Vitale Tested-by: Mark Vitale Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 1637c4d7c1ce407390f65509a3a1c764a0c06aa6) [not actually cherry picked, but is the equivalent functionality] Change-Id: I3978a5c4a704e0a0f2aab1cfad75573c16496a4d Reviewed-on: https://gerrit.openafs.org/12462 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand --- diff --git a/src/bozo/bos.c b/src/bozo/bos.c index b65961d08..8d0cb6869 100644 --- a/src/bozo/bos.c +++ b/src/bozo/bos.c @@ -1562,9 +1562,18 @@ SalvageCmd(struct cmd_syndesc *as, void *arock) for (i = MRAFS_OFFSET; i < ADDPARMOFFSET; i++) { if (as->parms[i].items) { - printf(" %s only possible for MR-AFS fileserver.\n", - as->parms[i].name); - stop = 1; + if (i == MRAFS_OFFSET + 5) { /* -salvagedirs */ + if (as->parms[4].items) { /* -all */ + mrafsParm.Optsalvagedirs = 1; /* Let this one slide. */ + } else { + printf(" -salvagedirs only possible with -all.\n"); + stop = 1; + } + } else { + printf(" %s only possible for MR-AFS fileserver.\n", + as->parms[i].name); + stop = 1; + } } } if (stop)