From: Nick Warne <nick@linicks.net>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.6.16.18 scripts/kconfig/mconf.c
Date: Fri, 2 Jun 2006 18:37:06 +0100 [thread overview]
Message-ID: <200606021837.06428.nick@linicks.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0606021608110.17704@scrub.home>
On Friday 02 June 2006 15:17, Roman Zippel wrote:
> Hi,
> Only choice symbols currently have no name, but there are otherwise normal
> symbols, so there is need to just return here. This should look more like:
>
> if (sym->name)
> str_printf(r, "Symbol: %s", sym->name);
> else if (sym_is_choice(sym))
> str_printf(r, "Choice:");
> else
> str_printf(r, "Weird symbol:");
> str_printf(r, "[=%s]\n", sym_get_string_value(sym));
>
> That looks a little misformated, anyway, this should just be:
>
> if (sym->name)
> str_printf(&help, "CONFIG_%s:\n\n", sym->name);
>
> str_append(&help, sym->help ? _(sym->help) : nohelp_text);
> str_append(&help, "\n");
> get_symbol_str(&help, sym);
> show_helptext(menu_get_prompt(menu), str_get(&help));
> str_free(&help);
>
> bye, Roman
Hi Roman,
I see, thanks - that works good, but one little thing - menu expanders now
produce a funny line at the end e.g. from 'Processor type and features ->
memory model' help, the last line:
Choice:[=y]
Prompt: Memory model
Defined at mm/Kconfig:5
Depends on: SELECT_MEMORY_MODEL
-> Processor type and features
Selected by: SELECT_MEMORY_MODEL && m
I don't know what '&& m' means and it isn't selected by anything; I think it
is bogus... so I have added a line to stop the 'selected by' being used if
the 'help' option is on a 'menu expander -->'
Nick
signed-off-by: Nick Warne <nick@linicks.net>
--- linux-current/scripts/kconfig/mconf.cORIG 2006-05-30 18:58:59.000000000
+0100
+++ linux-current/scripts/kconfig/mconf.c 2006-06-02 18:19:35.000000000 +0100
@@ -402,8 +402,13 @@
bool hit;
struct property *prop;
- str_printf(r, "Symbol: %s [=%s]\n", sym->name,
- sym_get_string_value(sym));
+ if (sym->name)
+ str_printf(r, "Symbol: %s", sym->name);
+ else if (sym_is_choice(sym))
+ str_printf(r, "Choice:");
+ else
+ str_printf(r, "Weird symbol:");
+ str_printf(r, "[=%s]\n", sym_get_string_value(sym));
for_all_prompts(sym, prop)
get_prompt_str(r, prop);
hit = false;
@@ -417,7 +422,7 @@
}
if (hit)
str_append(r, "\n");
- if (sym->rev_dep.expr) {
+ if (sym->rev_dep.expr && !sym_is_choice(sym)) {
str_append(r, " Selected by: ");
expr_gstr_print(sym->rev_dep.expr, r);
str_append(r, "\n");
@@ -849,19 +854,15 @@
struct gstr help = str_new();
struct symbol *sym = menu->sym;
- if (sym->help)
- {
- if (sym->name) {
- str_printf(&help, "CONFIG_%s:\n\n", sym->name);
- str_append(&help, _(sym->help));
- str_append(&help, "\n");
- }
- } else {
- str_append(&help, nohelp_text);
- }
- get_symbol_str(&help, sym);
- show_helptext(menu_get_prompt(menu), str_get(&help));
- str_free(&help);
+ if (sym->name)
+ str_printf(&help, "CONFIG_%s:\n\n", sym->name);
+
+ str_append(&help, sym->help ? _(sym->help) : nohelp_text);
+ str_append(&help, "\n");
+ get_symbol_str(&help, sym);
+ show_helptext(menu_get_prompt(menu), str_get(&help));
+ str_free(&help);
+
}
static void show_file(const char *filename, const char *title, int r, int c)
--
"Person who say it cannot be done should not interrupt person doing it."
-Chinese Proverb
prev parent reply other threads:[~2006-06-02 17:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 5:28 [PATCH] 2.6.16.18 scripts/kconfig/mconf.c Nick Warne
2006-06-02 14:17 ` Roman Zippel
2006-06-02 17:37 ` Nick Warne [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=200606021837.06428.nick@linicks.net \
--to=nick@linicks.net \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.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.