From: Andreas Dilger <adilger@clusterfs.com>
To: Jim Garlick <garlick@llnl.gov>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [patch 1/2] e2fsprogs: user selectable dup block handling in fsck
Date: Wed, 31 Jan 2007 23:06:24 -0700 [thread overview]
Message-ID: <20070201060624.GT5404@schatzie.adilger.int> (raw)
In-Reply-To: <Pine.LNX.4.61.0701310737550.25489@webb>
On Jan 31, 2007 08:22 -0800, Jim Garlick wrote:
> It also adds a check to make sure only one -E option is passed
> on the command line as -E option parsing is not cumulative.
>
> @@ -633,6 +639,8 @@ static errcode_t PRS(int argc, char *arg
> case 'E':
> + if (extended_opts)
> + fatal_error(ctx, _("-E must only be
> specified once"));
> extended_opts = optarg;
In such cases I've usually just changed the code to do the parsing
as the option is passed. Otherwise, it isn't possible to "override"
previously-specified options. This sometimes is needed if you have an
alias or script that is passing a bunch of options, and in some rare
cases you don't want the default, e.g.
alias mye2fsck="e2fsck -f -p -E clone=dup"
# mye2fsck -y -E clone=zero /dev/really-broken
Ted, is there a reason that the call to parse_extended_opts() can't
just be moved in place of saving the options in extended_opts? I
can't see anything in -E (yet) that depends on other options that
might not be set yet.
Also, it looks like that function leaks the duplicated string in "buf",
since that variable goes out of scope without freeing the allocation.
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
prev parent reply other threads:[~2007-02-01 6:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 16:22 [patch 1/2] e2fsprogs: user selectable dup block handling in fsck Jim Garlick
2007-01-31 16:24 ` [patch 2/2] " Jim Garlick
2007-02-01 6:16 ` Andreas Dilger
2007-02-01 6:06 ` Andreas Dilger [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=20070201060624.GT5404@schatzie.adilger.int \
--to=adilger@clusterfs.com \
--cc=garlick@llnl.gov \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).