Re: [PATCH 2/2] findmnt: add match_by_file to do within-device matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> > ---
> 
> 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@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux