From: Karel Zak <kzak@redhat.com>
To: Sami Kerola <kerolasa@iki.fi>
Cc: util-linux@vger.kernel.org, Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] mountpoint: symlinks are not mount points
Date: Fri, 22 Aug 2014 08:34:30 +0200 [thread overview]
Message-ID: <20140822063430.GG14708@x2.net.home> (raw)
In-Reply-To: <1408656867-20472-1-git-send-email-kerolasa@iki.fi>
On Fri, Aug 22, 2014 at 12:34:27AM +0300, Sami Kerola wrote:
> On 21 August 2014 22:28, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
> > On 08/21/2014 08:03 PM, Sami Kerola wrote:
> >> Earlier the mountpoint(1) followed symlinks
> >
> > IMO this is correct as symlinks only have to be treated
> > as such when explicitly not de-referencing.
> > As mountpoint(1) does not have a --no-dereference option,
> > symlinks should always be transparent for this tool.
> >
> > Furthermore, the patch would break scripts relying on existing
> > behavior:
> >
> > $ ln -s / slink
> >
> > $ /usr/bin/mountpoint slink
> > slink is a mountpoint
> >
> > $ # ~berny/util-linux/mountpoint slink
> > slink is not a mountpoint
>
> I don't share view symlinks are mount points. In my mind they are
> pointers, much like street signs, giving a direction to somewhere without
> understanding what is there if anything at all. But not breaking
> existing behavior is good point, so I changed the patch and added
> --no-dereference.
I don't think we need the patch, it does not resolve or improve
anything. It's over-engineering. If you don't like symlinks then you
can use
if [ ! -L $dir ]; then
mountpoint $dir
fi
> - if (stat(spec, &st)) {
> + if (lstat(spec, &st)) {
btw, you want to use lstat() only when no_dereference is specified.
Anyway, NACK. Sorry.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2014-08-22 6:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 18:03 [PATCH] mountpoint: symlinks are not mount points Sami Kerola
2014-08-21 19:28 ` Bernhard Voelker
2014-08-21 21:34 ` Sami Kerola
2014-08-22 6:34 ` Karel Zak [this message]
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=20140822063430.GG14708@x2.net.home \
--to=kzak@redhat.com \
--cc=kerolasa@iki.fi \
--cc=mail@bernhard-voelker.de \
--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