From: Mark Vitale Date: Thu, 25 Oct 2018 14:27:41 +0000 (-0400) Subject: viced: correct option parsing for -vlru*, -novbc X-Git-Tag: openafs-devel-1_9_0~400 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d058acb354cab9856303cc341a1f439e4f7f3454 viced: correct option parsing for -vlru*, -novbc Commit a5effd9f1011aa319fdf432c67aec604053b8656 "viced: Use libcmd for command line options" modernized the option parsing for (da)fileserver, but introduced a few errors for the following options: -vlruthresh -vlruinterval -vlrumax -novbc Correct the errors. Change-Id: If57dfabaa8d4e456b63d47694d288bd8c4235ad2 Reviewed-on: https://gerrit.openafs.org/13365 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- diff --git a/src/viced/viced.c b/src/viced/viced.c index a26676a..3eee5fb 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -1056,11 +1056,11 @@ ParseArgs(int argc, char *argv[]) cmd_AddParmAtOffset(opts, OPT_vlrudisable, "-vlrudisable", CMD_FLAG, CMD_OPTIONAL, "disable VLRU functionality"); cmd_AddParmAtOffset(opts, OPT_vlruthresh, "-vlruthresh", - CMD_FLAG, CMD_OPTIONAL, + CMD_SINGLE, CMD_OPTIONAL, "mins before unused vols become eligible for detach"); cmd_AddParmAtOffset(opts, OPT_vlruinterval, "-vlruinterval", - CMD_FLAG, CMD_OPTIONAL, "secs between VLRU scans"); - cmd_AddParmAtOffset(opts, OPT_vlrumax, "-vlrumax", CMD_FLAG, CMD_OPTIONAL, + CMD_SINGLE, CMD_OPTIONAL, "secs between VLRU scans"); + cmd_AddParmAtOffset(opts, OPT_vlrumax, "-vlrumax", CMD_SINGLE, CMD_OPTIONAL, "max volumes to detach in one scan"); cmd_AddParmAtOffset(opts, OPT_unsafe_nosalvage, "-unsafe-nosalvage", CMD_FLAG, CMD_OPTIONAL, @@ -1070,7 +1070,7 @@ ParseArgs(int argc, char *argv[]) /* unrecommend options - should perhaps be CMD_HIDE */ cmd_AddParmAtOffset(opts, OPT_cbwait, "-w", CMD_SINGLE, CMD_OPTIONAL, "callback wait interval"); - cmd_AddParmAtOffset(opts, OPT_novbc, "-novbc", CMD_SINGLE, CMD_FLAG, + cmd_AddParmAtOffset(opts, OPT_novbc, "-novbc", CMD_FLAG, CMD_OPTIONAL, "disable callback breaks on reattach"); /* general options */