summaryrefslogtreecommitdiff
path: root/ftpfs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-09-09 20:29:26 +0000
committerMiles Bader <miles@gnu.org>1997-09-09 20:29:26 +0000
commitf6b83f782f99f9a2b36b89f00414fb326a95cc1f (patch)
tree23125d855b963bc37158090083ff919ed2787bae /ftpfs
parent656809e0095f132759938bdf9aa26781ff1e811a (diff)
(netfs_append_args):
Fix printed name of --node-cache-size. (parse_runtime_opt): New function. (runtime_argp): Use it.
Diffstat (limited to 'ftpfs')
-rw-r--r--ftpfs/ftpfs.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c
index 3cc16a6c..3cf7b340 100644
--- a/ftpfs/ftpfs.c
+++ b/ftpfs/ftpfs.c
@@ -286,10 +286,24 @@ parse_startup_opt (int key, char *arg, struct argp_state *state)
/* Runtime options. */
+/* Parse a single command line option/argument. */
+static error_t
+parse_runtime_opt (int key, char *arg, struct argp_state *state)
+{
+ if (key == ARGP_KEY_INIT)
+ /* Setup up state for our first child parser (common options). */
+ {
+ state->child_inputs[0] = &ftpfs->params;
+ return 0;
+ }
+ else
+ return ARGP_ERR_UNKNOWN;
+}
+
static const struct argp_child runtime_argp_children[] =
{ {&common_argp}, {&netfs_std_runtime_argp}, {0} };
static struct argp runtime_argp =
- { 0, 0, 0, 0, runtime_argp_children };
+ { 0, parse_runtime_opt, 0, 0, runtime_argp_children };
/* Use by netfs_set_options to handle runtime option parsing. */
struct argp *netfs_runtime_argp = &runtime_argp;
@@ -330,7 +344,7 @@ netfs_append_args (char **argz, size_t *argz_len)
if (ftpfs->params.stat_timeout != DEFAULT_STAT_TIMEOUT)
FOPT ("--stat-timeout=%d", ftpfs->params.stat_timeout);
if (ftpfs->params.node_cache_max != DEFAULT_NODE_CACHE_MAX)
- FOPT ("--node-cache-max=%d", ftpfs->params.node_cache_max);
+ FOPT ("--node-cache-size=%d", ftpfs->params.node_cache_max);
if (ftpfs->params.bulk_stat_period != DEFAULT_BULK_STAT_PERIOD)
FOPT ("--bulk-stat-period=%d", ftpfs->params.bulk_stat_period);
if (ftpfs->params.bulk_stat_threshold != DEFAULT_BULK_STAT_THRESHOLD)