public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux-ng@vger.kernel.org
Subject: Re: fsck files w/relative paths
Date: Fri, 25 Jan 2013 12:02:01 -0500	[thread overview]
Message-ID: <201301251202.02511.vapier@gentoo.org> (raw)
In-Reply-To: <20130125151736.GP27413@x2.net.home>

[-- Attachment #1: Type: Text/Plain, Size: 1228 bytes --]

On Friday 25 January 2013 10:17:36 Karel Zak wrote:
> On Sun, Jan 20, 2013 at 06:27:22PM -0500, Mike Frysinger wrote:
> > we could tweak parse_argv() so that it checks for argv[0] == '.' in
> > addition to argv[0] == '/'.  but that wouldn't fix other relative paths
> > like: $ fsck images/foo
> > $ fsck foo
> 
> Hmm... maybe add a hint to the fsck man page is the best solution :-)
> 
> > should we treat all non-options as devices ?  would that break anything ?
> 
> I don't think it's a good idea.
> 
> All unknown stuff is by default interpreted as filesystem specific options
> (options for fsck.<type>) and it's pretty common that people don't use
> "--" separator between fsck and fsck.<type> options.

well, i didn't mean non-fsck options, but non-options.  i.e. things that don't 
start with dashes.  are there fscks which use non-options as something other 
than "file/device to check" ?

really, the fsck checking here is simply to determine whether it has to 
automatically look up the root device and append that to the command line.  if 
the user specified a file/device, then that shouldn't happen.  we could even 
resort to doing a stat() on the non-options to see if it exists.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-01-25 17:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20 23:27 fsck files w/relative paths Mike Frysinger
2013-01-25 15:17 ` Karel Zak
2013-01-25 17:02   ` Mike Frysinger [this message]
2013-01-25 17:36     ` Karel Zak
2013-01-25 19:55       ` Mike Frysinger

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=201301251202.02511.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=kzak@redhat.com \
    --cc=util-linux-ng@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