From: Steve Dickson <SteveD@redhat.com>
To: "J. Bruce Fields" <bfields@citi.umich.edu>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/3] mountd: trivial: name parameters for clarity
Date: Mon, 08 Mar 2010 15:04:51 -0500 [thread overview]
Message-ID: <4B955863.9040505@RedHat.com> (raw)
In-Reply-To: <1267992481-13332-2-git-send-email-bfields@citi.umich.edu>
On 03/07/2010 03:08 PM, J. Bruce Fields wrote:
> Part of the reason for the previous bug was confusion between "subpath"
> and "path"; which is the shorter path, and which the longer?
>
> "child" and "parent" seem less ambiguous.
>
> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
> ---
> utils/mountd/cache.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
> index ff27bbf..7dec468 100644
> --- a/utils/mountd/cache.c
> +++ b/utils/mountd/cache.c
> @@ -614,12 +614,12 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex
> return qword_eol(f);
> }
>
> -static int is_subdirectory(char *subpath, char *path)
> +static int is_subdirectory(char *child, char *parent)
> {
> - int l = strlen(path);
> + int l = strlen(parent);
>
> - return strcmp(subpath, path) == 0
> - || (strncmp(subpath, path, l) == 0 && subpath[l] == '/');
> + return strcmp(child, parent) == 0
> + || (strncmp(child, parent, l) == 0 && child[l] == '/');
> }
>
> static int path_matches(nfs_export *exp, char *path)
Committed...
steved
next prev parent reply other threads:[~2010-03-08 20:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-28 10:06 Problems with crossmnt since 1.2.1 Iustin Pop
[not found] ` <20100228100643.GG26178-kWFYwFCQMdQkLqoNrXjPMti2O/JbrIOy@public.gmane.org>
2010-03-01 20:40 ` J. Bruce Fields
2010-03-01 21:13 ` Iustin Pop
[not found] ` <20100301211306.GA16341-kWFYwFCQMdQkLqoNrXjPMti2O/JbrIOy@public.gmane.org>
2010-03-01 21:39 ` J. Bruce Fields
2010-03-01 21:41 ` Iustin Pop
[not found] ` <20100301214116.GB16341-kWFYwFCQMdQkLqoNrXjPMti2O/JbrIOy@public.gmane.org>
2010-03-01 21:52 ` J. Bruce Fields
2010-03-02 3:20 ` J. Bruce Fields
2010-03-07 19:54 ` Iustin Pop
[not found] ` <20100307195449.GE9237-kWFYwFCQMdQkLqoNrXjPMti2O/JbrIOy@public.gmane.org>
2010-03-07 20:06 ` J. Bruce Fields
2010-03-07 20:07 ` [PATCH 1/3] mountd: fix path comparison for v4 crossmnt J. Bruce Fields
2010-03-07 20:08 ` [PATCH 2/3] mountd: trivial: name parameters for clarity J. Bruce Fields
2010-03-07 20:08 ` [PATCH 3/3] mountd: fix crossmnt options in v2/v3 case J. Bruce Fields
2010-03-07 21:25 ` Neil Brown
[not found] ` <20100308082516.260e5f70-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-03-07 21:58 ` J. Bruce Fields
2010-03-07 23:10 ` Neil Brown
[not found] ` <20100308101014.14e635b2-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-03-08 18:21 ` J. Bruce Fields
2010-03-08 18:23 ` J. Bruce Fields
2010-03-08 18:30 ` Chuck Lever
2010-03-08 18:41 ` J. Bruce Fields
2010-03-08 18:45 ` Chuck Lever
2010-03-08 19:56 ` Steve Dickson
2010-03-08 20:04 ` Steve Dickson [this message]
2010-03-08 20:04 ` [PATCH 1/3] mountd: fix path comparison for v4 crossmnt Steve Dickson
2010-03-08 20:28 ` Problems with crossmnt since 1.2.1 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=4B955863.9040505@RedHat.com \
--to=steved@redhat.com \
--cc=bfields@citi.umich.edu \
--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.