From d914ad4c75716b4870e22e8b43629057e35e2eee Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 8 Feb 2010 15:03:08 -0600 Subject: [PATCH] salvager: alias -f to -force DAFS added the -forceDAFS flag, which made the '-f' flag ambiguous, when it used to be short for '-force'. Restore the previous meaning of '-f' to reduce backwards incompatibility. FIXES 124916 Change-Id: Ieb864b35a91000960f9d9c503c28db56602df13e Reviewed-on: http://gerrit.openafs.org/1254 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/vol/salvager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vol/salvager.c b/src/vol/salvager.c index 5f305c8902..8716dc2de3 100644 --- a/src/vol/salvager.c +++ b/src/vol/salvager.c @@ -198,7 +198,7 @@ handleit(struct cmd_syndesc *as, void *arock) Testing = 1; if (as->parms[4].items) /* -inodes */ ListInodeOption = 1; - if (as->parms[5].items) /* -force */ + if (as->parms[5].items || as->parms[20].items) /* -force, -f */ ForceSalvage = 1; if (as->parms[6].items) /* -oktozap */ OKToZap = 1; @@ -503,6 +503,8 @@ main(int argc, char **argv) cmd_AddParm(ts, "-forceDAFS", CMD_FLAG, CMD_OPTIONAL, "For Demand Attach Fileserver, permit a manual volume salvage outside of the salvageserver"); #endif /* FAST_RESTART */ + cmd_Seek(ts, 20); + cmd_AddParm(ts, "-f", CMD_FLAG, CMD_OPTIONAL, "Alias for -force"); err = cmd_Dispatch(argc, argv); Exit(err); return 0; /* not reached */