From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] fsck: fix strange logic
Date: Wed, 10 Aug 2016 17:40:28 -0400 [thread overview]
Message-ID: <20160810214028.GB10523@thunk.org> (raw)
In-Reply-To: <0F4CAD2B-88EB-4727-8937-E50D776F3264@dilger.ca>
On Tue, Aug 09, 2016 at 02:26:21PM -0600, Andreas Dilger wrote:
> I'll push a v2 patch that keeps the original logic, and Ted can choose
> which one is correct.
>
The original logic is what's intended. What's going on here is that
the argument to -C is optional (for backwards compatibility reasons),
and we know it's always going to be a positive integer, since it's a
file descriptor. If the next argument begins with a '-', it must be
an option specifier, and the argument to -C was missing. If the next
argument does not begin with a '-', then we try to parse it as an
integer, and we rely on the fact that in general the device specifier
to fsck generally begins with a '/', and if not, isn't going to be
parseable as a number.
- Ted
next prev parent reply other threads:[~2016-08-10 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 20:12 [PATCH] fsck: fix strange logic Andreas Dilger
2016-08-09 20:26 ` Andreas Dilger
2016-08-10 21:40 ` Theodore Ts'o [this message]
2016-08-09 20:27 ` [PATCHv2] " Andreas Dilger
2016-08-10 22:54 ` Theodore Ts'o
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=20160810214028.GB10523@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.