From: Bernd Schubert <bschubert@q-leap.de>
To: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] e2fsck/e2fsprogs: answer yes/no to a group of questions
Date: Thu, 02 Aug 2007 18:32:28 +0200 [thread overview]
Message-ID: <f8t0ut$mqs$1@sea.gmane.org> (raw)
In-Reply-To: 20070801222856.GA5692@schatzie.adilger.int
Andreas Dilger wrote:
> On Aug 01, 2007 14:57 +0200, Bernd Schubert wrote:
>> saying yes or no to all e2fsck questions can be rather annoying (yes I
>> know -p and -y), so here's a patch to answer yes or no to a group of
>> questions.
>
> I've wanted something like this for quite a while already.
>
> What would be more useful, however, is having the yes-to-all or no-to-all
> apply to a particular problem instead of being generic. Otherwise it
> isn't really different from using -y or -n. The reason that is useful
> is that often there is a particular problem that should all be fixed or
> skipped, but you want to be prompted how to fix a different problem type.
But isn't that what the patch is going to do?
int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
{
...
ptr = find_problem(code); // So ptr is problem specific
}
Actually there was already everything prepared, it seems someone just forgot
to add a patch like this.
>
> I haven't investigated, but maybe this could be implemented in the
> same way as a latch for every problem?
>
>> + if (ptr->flags & PR_YES_TO_ALL) {
>> + printf("%s: yes\n", _(prompt[(int) ptr->prompt]));
>> + return YES;
>> + } else if (ptr->flags & PR_NO_TO_ALL) {
>> + printf("%s: no\n", _(prompt[(int) ptr->prompt]));
>> + return NO;
>> + }
>
> The "yes" and "no" here should be "_("yes")" and "_("no")" like in
> ask() so they are translated.
Thanks, going to correct this.
Cheers,
Bernd
next prev parent reply other threads:[~2007-08-02 16:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 12:57 [PATCH] e2fsck/e2fsprogs: answer yes/no to a group of questions Bernd Schubert
2007-08-01 22:28 ` Andreas Dilger
2007-08-02 16:32 ` Bernd Schubert [this message]
2007-08-06 11:20 ` Bernd Schubert
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='f8t0ut$mqs$1@sea.gmane.org' \
--to=bschubert@q-leap.de \
--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 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).