public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: util-linux@vger.kernel.org
Subject: Re: [PATCH 2/2] findmnt: add match_by_file to do within-device matching
Date: Thu, 26 Apr 2012 09:46:35 +0200	[thread overview]
Message-ID: <20120426074635.GB28346@x2.net.home> (raw)
In-Reply-To: <20120426021651.GH938@rampage>

On Wed, Apr 25, 2012 at 10:16:51PM -0400, Dave Reisner wrote:
> On Wed, Apr 25, 2012 at 08:30:52PM -0400, Dave Reisner wrote:
> > Use the newly exported mnt_get_mountpoint to determine the device that a
> > given file resides on, in case the supplied source or target is not
> > explicitly a mount point.
> > 
> > http://www.spinics.net/lists/util-linux-ng/msg06081.html
> > 
> > Signed-off-by: Dave Reisner <dreisner@archlinux.org>
> > ---
> 
> On second thought, this isn't good -- it'll return results even when
> you're searching with --fstab (which is completely undesirable, imo).

 I'll fix it, that's easy. Thanks.

> >  	m = get_match(COL_TARGET);
> > -	if (m && !mnt_fs_match_target(fs, m, cache))
> > +	if (m && !match_by_file(m, fs, mnt_fs_match_target))
> >  		return rc;
> >  
> >  	m = get_match(COL_SOURCE);
> > -	if (m && !mnt_fs_match_source(fs, m, cache))
> > +	if (m && !match_by_file(m, fs, mnt_fs_match_source))

 why we need this functionality for SOURCE too?

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2012-04-26  7:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26  0:30 [PATCH 1/2] libmount: expose mnt_get_mountpoint as external API Dave Reisner
2012-04-26  0:30 ` [PATCH 2/2] findmnt: add match_by_file to do within-device matching Dave Reisner
2012-04-26  2:16   ` Dave Reisner
2012-04-26  7:46     ` Karel Zak [this message]
2012-04-26 10:45       ` Dave Reisner
2012-04-27 12:28     ` 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=20120426074635.GB28346@x2.net.home \
    --to=kzak@redhat.com \
    --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