From: Steve Dickson <SteveD@redhat.com>
To: Steve Dickson <steved@redhat.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] nfsmount.conf: remove duplicate 'timeo' from the parsing string
Date: Mon, 21 Oct 2013 10:04:50 -0400 [thread overview]
Message-ID: <52653482.1030800@RedHat.com> (raw)
In-Reply-To: <1381267825-27457-2-git-send-email-steved@redhat.com>
On 08/10/13 17:30, Steve Dickson wrote:
> When the 'timeo' option is specified in multiple sections of
> the nfsmount.conf file, each instance is added to the parsing
> string. This patch make the first instance override any others.
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...
steved.
> ---
> utils/mount/configfile.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c
> index 6985ed9..39d3741 100644
> --- a/utils/mount/configfile.c
> +++ b/utils/mount/configfile.c
> @@ -186,8 +186,18 @@ char *lookup_entry(char *opt)
> {
> struct entry *entry;
> char *alias = is_alias(opt);
> + char *ptr;
>
> SLIST_FOREACH(entry, &head, entries) {
> + /*
> + * Only check the left side or options that use '='
> + */
> + if ((ptr = strchr(entry->opt, '=')) != 0) {
> + int len = (int) (ptr - entry->opt);
> +
> + if (strncasecmp(entry->opt, opt, len) == 0)
> + return opt;
> + }
> if (strcasecmp(entry->opt, opt) == 0)
> return opt;
> if (alias && strcasecmp(entry->opt, alias) == 0)
>
next prev parent reply other threads:[~2013-10-21 14:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 21:30 [PATCH 1/2] nfsmount.conf: Remove duplicate 'bg' and 'fg' from parsing string Steve Dickson
2013-10-08 21:30 ` [PATCH 2/2] nfsmount.conf: remove duplicate 'timeo' from the " Steve Dickson
2013-10-21 14:04 ` Steve Dickson [this message]
2013-10-21 14:04 ` [PATCH 1/2] nfsmount.conf: Remove duplicate 'bg' and 'fg' from " Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52653482.1030800@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.