diff options
-rw-r--r-- | support/include/conffile.h | 2 | ||||
-rw-r--r-- | support/nfs/conffile.c | 4 | ||||
-rw-r--r-- | utils/mount/configfile.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/support/include/conffile.h b/support/include/conffile.h index ce7aa21..05ea5d2 100644 --- a/support/include/conffile.h +++ b/support/include/conffile.h @@ -54,7 +54,7 @@ extern int conf_end(int, int); extern void conf_free_list(struct conf_list *); extern struct sockaddr *conf_get_address(char *, char *); extern struct conf_list *conf_get_list(char *, char *); -extern struct conf_list *conf_get_tag_list(char *); +extern struct conf_list *conf_get_tag_list(char *, char *); extern int conf_get_num(char *, char *, int); extern char *conf_get_str(char *, char *); extern char *conf_get_section(char *, char *, char *); diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c index 5015e94..c3434d5 100644 --- a/support/nfs/conffile.c +++ b/support/nfs/conffile.c @@ -565,7 +565,7 @@ cleanup: } struct conf_list * -conf_get_tag_list(char *section) +conf_get_tag_list(char *section, char *arg) { struct conf_list *list = 0; struct conf_list_node *node; @@ -579,6 +579,8 @@ conf_get_tag_list(char *section) cb = LIST_FIRST(&conf_bindings[conf_hash (section)]); for (; cb; cb = LIST_NEXT(cb, link)) { if (strcasecmp (section, cb->section) == 0) { + if (arg != NULL && strcasecmp(arg, cb->arg) != 0) + continue; list->cnt++; node = calloc(1, sizeof *node); if (!node) diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c index 6f2ee75..1f1b6e7 100644 --- a/utils/mount/configfile.c +++ b/utils/mount/configfile.c @@ -286,7 +286,7 @@ conf_parse_mntopts(char *section, char *arg, char *opts) char *nvalue, *ptr; int argtype; - list = conf_get_tag_list(section); + list = conf_get_tag_list(section, arg); TAILQ_FOREACH(node, &list->fields, link) { /* * Do not overwrite options if already exists |