Util-Linux package development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Ruediger Meier <sweet_f_a@gmx.de>
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, util-linux@vger.kernel.org
Subject: Re: question about findmnt --target
Date: Wed, 18 Mar 2015 12:22:52 +0100	[thread overview]
Message-ID: <20150318112252.GD28925@ws.net.home> (raw)
In-Reply-To: <201503181139.46639.sweet_f_a@gmx.de>

On Wed, Mar 18, 2015 at 11:39:45AM +0100, Ruediger Meier wrote:
> On Wednesday 18 March 2015, Bernhard Voelker wrote:
> > On 03/17/2015 05:34 PM, Karel Zak wrote:
> > > Maybe we need a new option to disable the evaluation of the target
> > > path elements. (--strict-target)
> >
> > Hey, we already have a tool for that: 'mountpoint' ;-)
> >
> > What's wrong with
> >
> >   mountpoint "$DIR_B" >/dev/null \
> >     && findmnt --target "$DIR_B" \
> >     && ...
> 
> Yeah! In context of that tests/ts/mount/move snippet this should be 
> enough:
> 
> [...]
> # move
> $TS_CMD_MOUNT --move $DIR_A $DIR_B
> 
> # check the move
> $TS_CMD_MOUNTPOINT -q $DIR_B || ts_failed "Cannot find binded $DIR_B"
> [...]
> 
> I still wonder why we don't check mount's return value too. Here it 
> should always return 0, right?

 check return code is good idea, but please still check the mountpoint
 too. It's mount(8) test - we need an independent verification.


    Karel

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

      reply	other threads:[~2015-03-18 11:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 15:08 question about findmnt --target Ruediger Meier
2015-03-17 16:34 ` Karel Zak
2015-03-17 17:14   ` Ruediger Meier
2015-03-17 19:25     ` Karel Zak
2015-03-18 13:50       ` Ruediger Meier
2015-03-18 22:05         ` Karel Zak
2015-03-18  7:33   ` Bernhard Voelker
2015-03-18 10:17     ` Karel Zak
2015-03-18 10:39     ` Ruediger Meier
2015-03-18 11:22       ` 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=20150318112252.GD28925@ws.net.home \
    --to=kzak@redhat.com \
    --cc=mail@bernhard-voelker.de \
    --cc=sweet_f_a@gmx.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