From: Karel Zak <kzak@redhat.com>
To: Dave Reisner <d@falconindy.com>
Cc: util-linux@vger.kernel.org, Dave Reisner <dreisner@archlinux.org>
Subject: Re: [PATCH] mount: don't canonicalize the source of a pseudofs
Date: Tue, 27 Dec 2011 12:29:16 +0100 [thread overview]
Message-ID: <20111227112916.GC2010@x2.net.home> (raw)
In-Reply-To: <1324943244-27332-1-git-send-email-dreisner@archlinux.org>
On Mon, Dec 26, 2011 at 06:47:24PM -0500, Dave Reisner wrote:
> In line with previous patches, the source of a pseudofs is strictly
> semantic; do not attempt to resolve it to a filesystem path.
>
> As a side effect of this, nspec needs to be initialized to NULL since
> it may not be assigned null by spec_to_devname when the FS is deemed
> a pseudofs.
>
> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
> ---
> This wasn't as evil as I thought, after all...
>
> mount/mount.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mount/mount.c b/mount/mount.c
> index 9b444c4..49d49f6 100644
> --- a/mount/mount.c
> +++ b/mount/mount.c
> @@ -2016,7 +2016,7 @@ is_existing_file (const char *s) {
> static int
> mount_one (const char *spec, const char *node, const char *types,
> const char *fstabopts, char *cmdlineopts, int freq, int pass) {
> - const char *nspec;
> + const char *nspec = NULL;
> char *opts;
>
> /* Substitute values in opts, if required */
> @@ -2046,7 +2046,8 @@ mount_one (const char *spec, const char *node, const char *types,
> strncmp(types, "nfs", 3) &&
> strncmp(types, "cifs", 4) &&
> strncmp(types, "smbfs", 5))) {
> - nspec = spec_to_devname(spec);
> + if (!is_pseudo_fs(types))
> + nspec = spec_to_devname(spec);
Exactly this is implemented in spec_to_devname(), it does not
canonicalize pseudo filesystems.
> if (nspec)
> spec = nspec;
> }
> --
> 1.7.8.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2011-12-27 11:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-26 22:10 [PATCH 1/2] libmount/tab: always trust the source of a pseudofs Dave Reisner
2011-12-26 22:10 ` [PATCH 2/2] libmount/context: avoid resolving pseudofs source on update Dave Reisner
2012-01-02 14:02 ` Karel Zak
2011-12-26 23:47 ` [PATCH] mount: don't canonicalize the source of a pseudofs Dave Reisner
2011-12-27 11:29 ` Karel Zak [this message]
2012-01-02 14:02 ` Karel Zak
2012-01-02 14:01 ` [PATCH 1/2] libmount/tab: always trust " Karel Zak
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=20111227112916.GC2010@x2.net.home \
--to=kzak@redhat.com \
--cc=d@falconindy.com \
--cc=dreisner@archlinux.org \
--cc=util-linux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).