2009-07-12 08:12:08

by Cheng Renquan

[permalink] [raw]
Subject: [PATCH 0/6] kbuild configuration system improvements

From: Cheng Renquan <[email protected]>

These patches improve usability of kernel configuration system,

1. add symbol's value shown accompanied in config item's help message;
2. move the real plumbing functions code from mconf.c to menu.c, make them
be able to be shared with other configuration methods;
3. add "symbol's value shown" support for gconfig/xconfig/config;

0001-add-symbol-value-to-help-find-the-real-depend.patch
0002-add-menu_get_ext_help-function-to-display-more-infor.patch
0003-menuconfig-improvements.patch
0004-make-use-of-menu_get_ext_help-in-gconfig.patch
0005-make-use-of-menu_get_ext_help-in-qconfig.patch
0006-make-use-of-menu_get_ext_help-in-make-config.patch

--
Cheng Renquan


2009-07-12 08:12:43

by Cheng Renquan

[permalink] [raw]
Subject: [PATCH 1/6] add symbol value to help find the real depend

From: Cheng Renquan <[email protected]>

kbuild-menuconfig-display-depend-value.patch

Sometimes when configuring need to disable some unused item, but the item is
selected by many other items, it's hard to find the real dependency which
selected it, This patch add every symbol's value accompanied to make it
possible to find the real dependency easily.

An example is CONFIG_RFKILL,

---------------------- RF switch subsystem support ----------------------
| CONFIG_RFKILL: |
| |
| Say Y here if you want to have control over RF switches |
| found on many WiFi and Bluetooth cards. |
| |
| To compile this driver as a module, choose M here: the |
| module will be called rfkill. |
| |
| Symbol: RFKILL [=m] |
| Prompt: RF switch subsystem support |
| Defined at net/rfkill/Kconfig:4 |
| Depends on: NET [=y] |
| Location: |
| -> Networking support (NET [=y]) |
| Selected by: IWLCORE [=n] && NETDEVICES [=y] && !S390 [=S390] && PC |
| |
----------------------------------------------------------------( 99%)---

Signed-off-by: Cheng Renquan <[email protected]>
---
scripts/kconfig/expr.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index 579ece4..cd8a2f0 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -1098,6 +1098,8 @@ void expr_fprint(struct expr *e, FILE *out)
static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
{
str_append((struct gstr*)data, str);
+ if (sym)
+ str_printf((struct gstr*)data, " [=%s]", sym_get_string_value(sym));
}

void expr_gstr_print(struct expr *e, struct gstr *gs)
--
1.6.3.3

2009-07-12 08:13:00

by Cheng Renquan

[permalink] [raw]
Subject: [PATCH 5/6] make use of menu_get_ext_help in qconfig

From: Cheng Renquan <[email protected]>

Signed-off-by: Cheng Renquan <[email protected]>
---
scripts/kconfig/qconf.cc | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index ce7d508..00c5150 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1042,12 +1042,10 @@ void ConfigInfoView::menuInfo(void)
if (showDebug())
debug = debug_info(sym);

- help = menu_get_help(menu);
- /* Gettextize if the help text not empty */
- if (help.isEmpty())
- help = print_filter(menu_get_help(menu));
- else
- help = print_filter(_(menu_get_help(menu)));
+ struct gstr help_gstr = str_new();
+ menu_get_ext_help(menu, &help_gstr);
+ help = print_filter(str_get(&help_gstr));
+ str_free(&help_gstr);
} else if (menu->prompt) {
head += "<big><b>";
head += print_filter(_(menu->prompt->text));
--
1.6.3.3

2009-07-12 08:13:21

by Cheng Renquan

[permalink] [raw]
Subject: [PATCH 3/6] menuconfig improvements

From: Cheng Renquan <[email protected]>

The removed functions are moved into menu.c for sharing with
gconfig & xconfig & config.

Signed-off-by: Cheng Renquan <[email protected]>
---
scripts/kconfig/mconf.c | 78 ++---------------------------------------------
1 files changed, 3 insertions(+), 75 deletions(-)

diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 3bcacb4..4567b5e 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -199,8 +199,6 @@ inputbox_instructions_string[] = N_(
setmod_text[] = N_(
"This feature depends on another which has been configured as a module.\n"
"As a result, this feature will be built as a module."),
-nohelp_text[] = N_(
- "There is no help available for this kernel option.\n"),
load_config_text[] = N_(
"Enter the name of the configuration file you wish to load. "
"Accept the name shown to restore the configuration you "
@@ -284,66 +282,6 @@ static void show_textbox(const char *title, const char *text, int r, int c);
static void show_helptext(const char *title, const char *text);
static void show_help(struct menu *menu);

-static void get_prompt_str(struct gstr *r, struct property *prop)
-{
- int i, j;
- struct menu *submenu[8], *menu;
-
- str_printf(r, _("Prompt: %s\n"), _(prop->text));
- str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
- prop->menu->lineno);
- if (!expr_is_yes(prop->visible.expr)) {
- str_append(r, _(" Depends on: "));
- expr_gstr_print(prop->visible.expr, r);
- str_append(r, "\n");
- }
- menu = prop->menu->parent;
- for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
- submenu[i++] = menu;
- if (i > 0) {
- str_printf(r, _(" Location:\n"));
- for (j = 4; --i >= 0; j += 2) {
- menu = submenu[i];
- str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
- if (menu->sym) {
- str_printf(r, " (%s [=%s])", menu->sym->name ?
- menu->sym->name : _("<choice>"),
- sym_get_string_value(menu->sym));
- }
- str_append(r, "\n");
- }
- }
-}
-
-static void get_symbol_str(struct gstr *r, struct symbol *sym)
-{
- bool hit;
- struct property *prop;
-
- if (sym && sym->name)
- str_printf(r, "Symbol: %s [=%s]\n", sym->name,
- sym_get_string_value(sym));
- for_all_prompts(sym, prop)
- get_prompt_str(r, prop);
- hit = false;
- for_all_properties(sym, prop, P_SELECT) {
- if (!hit) {
- str_append(r, " Selects: ");
- hit = true;
- } else
- str_printf(r, " && ");
- expr_gstr_print(prop->expr, r);
- }
- if (hit)
- str_append(r, "\n");
- if (sym->rev_dep.expr) {
- str_append(r, _(" Selected by: "));
- expr_gstr_print(sym->rev_dep.expr, r);
- str_append(r, "\n");
- }
- str_append(r, "\n\n");
-}
-
static struct gstr get_relations_str(struct symbol **sym_arr)
{
struct symbol *sym;
@@ -699,19 +637,9 @@ static void show_helptext(const char *title, const char *text)
static void show_help(struct menu *menu)
{
struct gstr help = str_new();
- struct symbol *sym = menu->sym;
-
- if (menu_has_help(menu))
- {
- if (sym->name) {
- str_printf(&help, "CONFIG_%s:\n\n", sym->name);
- str_append(&help, _(menu_get_help(menu)));
- str_append(&help, "\n");
- }
- } else {
- str_append(&help, nohelp_text);
- }
- get_symbol_str(&help, sym);
+
+ menu_get_ext_help(menu, &help);
+
show_helptext(_(menu_get_prompt(menu)), str_get(&help));
str_free(&help);
}
--
1.6.3.3

2009-07-12 08:13:37

by Cheng Renquan

[permalink] [raw]
Subject: [PATCH 4/6] make use of menu_get_ext_help in gconfig

From: Cheng Renquan <[email protected]>

Futhermore, gconfig interface lack the "search a symbol" function, do later.

Signed-off-by: Cheng Renquan <[email protected]>
---
scripts/kconfig/gconf.c | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 199b22b..6546436 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -456,19 +456,9 @@ static void text_insert_help(struct menu *menu)
GtkTextBuffer *buffer;
GtkTextIter start, end;
const char *prompt = _(menu_get_prompt(menu));
- gchar *name;
- const char *help;
+ struct gstr help = str_new();

- help = menu_get_help(menu);
-
- /* Gettextize if the help text not empty */
- if ((help != 0) && (help[0] != 0))
- help = _(help);
-
- if (menu->sym && menu->sym->name)
- name = g_strdup_printf(menu->sym->name);
- else
- name = g_strdup("");
+ menu_get_ext_help(menu, &help);

buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
gtk_text_buffer_get_bounds(buffer, &start, &end);
@@ -478,14 +468,11 @@ static void text_insert_help(struct menu *menu)
gtk_text_buffer_get_end_iter(buffer, &end);
gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
NULL);
- gtk_text_buffer_insert_at_cursor(buffer, " ", 1);
- gtk_text_buffer_get_end_iter(buffer, &end);
- gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1,
- NULL);
gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
gtk_text_buffer_get_end_iter(buffer, &end);
- gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2,
+ gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
NULL);
+ str_free(&help);
}


--
1.6.3.3

2009-07-12 08:13:57

by Cheng Renquan

[permalink] [raw]
Subject: [PATCH 6/6] make use of menu_get_ext_help in "make config"

From: Cheng Renquan <[email protected]>

Signed-off-by: Cheng Renquan <[email protected]>
---
scripts/kconfig/conf.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 3baaaec..5de3303 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -38,14 +38,14 @@ static int conf_cnt;
static char line[128];
static struct menu *rootEntry;

-static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
-
-static const char *get_help(struct menu *menu)
+static void print_help(struct menu *menu)
{
- if (menu_has_help(menu))
- return _(menu_get_help(menu));
- else
- return nohelp_text;
+ struct gstr help = str_new();
+
+ menu_get_ext_help(menu, &help);
+
+ printf("\n%s\n", str_get(&help));
+ str_free(&help);
}

static void strip(char *str)
@@ -140,7 +140,7 @@ int conf_string(struct menu *menu)
case '?':
/* print help */
if (line[1] == '\n') {
- printf("\n%s\n", get_help(menu));
+ print_help(menu);
def = NULL;
break;
}
@@ -220,7 +220,7 @@ static int conf_sym(struct menu *menu)
if (sym_set_tristate_value(sym, newval))
return 0;
help:
- printf("\n%s\n", get_help(menu));
+ print_help(menu);
}
}

@@ -307,7 +307,7 @@ static int conf_choice(struct menu *menu)
fgets(line, 128, stdin);
strip(line);
if (line[0] == '?') {
- printf("\n%s\n", get_help(menu));
+ print_help(menu);
continue;
}
if (!line[0])
@@ -331,7 +331,7 @@ static int conf_choice(struct menu *menu)
if (!child)
continue;
if (line[strlen(line) - 1] == '?') {
- printf("\n%s\n", get_help(child));
+ print_help(child);
continue;
}
sym_set_choice_value(sym, child->sym);
--
1.6.3.3

2009-07-12 08:14:14

by Cheng Renquan

[permalink] [raw]
Subject: [PATCH 2/6] add menu_get_ext_help function to display more information

From: Cheng Renquan <[email protected]>

The three functions are moved from mconf.c, then they can be shared in
all menuconfig & gconfig & xconfig & config.

+void menu_get_ext_help(struct menu *menu, struct gstr *help)
+static void get_prompt_str(struct gstr *r, struct property *prop)
+void get_symbol_str(struct gstr *r, struct symbol *sym)

Signed-off-by: Cheng Renquan <[email protected]>
---
scripts/kconfig/lkc_proto.h | 2 +
scripts/kconfig/menu.c | 79 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index 8e69461..ffeb532 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -17,6 +17,8 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu));
P(menu_get_parent_menu,struct menu *,(struct menu *menu));
P(menu_has_help,bool,(struct menu *menu));
P(menu_get_help,const char *,(struct menu *menu));
+P(get_symbol_str,void,(struct gstr *r, struct symbol *sym));
+P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));

/* symbol.c */
P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 07ff8d1..931d782 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -9,6 +9,9 @@
#define LKC_DIRECT_LINK
#include "lkc.h"

+static const char nohelp_text[] = N_(
+ "There is no help available for this kernel option.\n");
+
struct menu rootmenu;
static struct menu **last_entry_ptr;

@@ -451,3 +454,79 @@ const char *menu_get_help(struct menu *menu)
else
return "";
}
+
+static void get_prompt_str(struct gstr *r, struct property *prop)
+{
+ int i, j;
+ struct menu *submenu[8], *menu;
+
+ str_printf(r, _("Prompt: %s\n"), _(prop->text));
+ str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
+ prop->menu->lineno);
+ if (!expr_is_yes(prop->visible.expr)) {
+ str_append(r, _(" Depends on: "));
+ expr_gstr_print(prop->visible.expr, r);
+ str_append(r, "\n");
+ }
+ menu = prop->menu->parent;
+ for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
+ submenu[i++] = menu;
+ if (i > 0) {
+ str_printf(r, _(" Location:\n"));
+ for (j = 4; --i >= 0; j += 2) {
+ menu = submenu[i];
+ str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
+ if (menu->sym) {
+ str_printf(r, " (%s [=%s])", menu->sym->name ?
+ menu->sym->name : _("<choice>"),
+ sym_get_string_value(menu->sym));
+ }
+ str_append(r, "\n");
+ }
+ }
+}
+
+void get_symbol_str(struct gstr *r, struct symbol *sym)
+{
+ bool hit;
+ struct property *prop;
+
+ if (sym && sym->name)
+ str_printf(r, "Symbol: %s [=%s]\n", sym->name,
+ sym_get_string_value(sym));
+ for_all_prompts(sym, prop)
+ get_prompt_str(r, prop);
+ hit = false;
+ for_all_properties(sym, prop, P_SELECT) {
+ if (!hit) {
+ str_append(r, " Selects: ");
+ hit = true;
+ } else
+ str_printf(r, " && ");
+ expr_gstr_print(prop->expr, r);
+ }
+ if (hit)
+ str_append(r, "\n");
+ if (sym->rev_dep.expr) {
+ str_append(r, _(" Selected by: "));
+ expr_gstr_print(sym->rev_dep.expr, r);
+ str_append(r, "\n");
+ }
+ str_append(r, "\n\n");
+}
+
+void menu_get_ext_help(struct menu *menu, struct gstr *help)
+{
+ struct symbol *sym = menu->sym;
+
+ if (menu_has_help(menu)) {
+ if (sym->name) {
+ str_printf(help, "CONFIG_%s:\n\n", sym->name);
+ str_append(help, _(menu_get_help(menu)));
+ str_append(help, "\n");
+ }
+ } else {
+ str_append(help, nohelp_text);
+ }
+ get_symbol_str(help, sym);
+}
--
1.6.3.3

2009-07-12 10:25:38

by Mikael Pettersson

[permalink] [raw]
Subject: Re: [PATCH 1/6] add symbol value to help find the real depend

Cheng Renquan writes:
> From: Cheng Renquan <[email protected]>
>
> kbuild-menuconfig-display-depend-value.patch
>
> Sometimes when configuring need to disable some unused item, but the item is
> selected by many other items, it's hard to find the real dependency which
> selected it, This patch add every symbol's value accompanied to make it
> possible to find the real dependency easily.
>
> An example is CONFIG_RFKILL,
>
> ---------------------- RF switch subsystem support ----------------------
> | CONFIG_RFKILL: |
> | |
> | Say Y here if you want to have control over RF switches |
> | found on many WiFi and Bluetooth cards. |
> | |
> | To compile this driver as a module, choose M here: the |
> | module will be called rfkill. |
> | |
> | Symbol: RFKILL [=m] |
> | Prompt: RF switch subsystem support |
> | Defined at net/rfkill/Kconfig:4 |
> | Depends on: NET [=y] |
> | Location: |
> | -> Networking support (NET [=y]) |
> | Selected by: IWLCORE [=n] && NETDEVICES [=y] && !S390 [=S390] && PC |
> | |
> ----------------------------------------------------------------( 99%)---

I like this concept, but I'd like to see it supported with make oldconfig.
Let's say I copy a .config from kernel X into kernel Y (Y>X) and make oldconfig.
Sometimes the new kernel will enable some previously disabled option, and
it would be very useful to see WHY.

To take a concrete example, in my 2.6.30 .config I had:

CONFIG_DRM=m
CONFIG_DRM_RADEON=m
# CONFIG_FB is not set

which when oldconfig'd in 2.6.31-rc changed to

CONFIG_DRM=m
CONFIG_DRM_RADEON=m
CONFIG_FB=m
(+ some more FB stuff)

In this case it would have been nice to get an explanation that DRM_RADEON
was responsible for (wrongly, IMO) selecting FB. Something like

# CONFIG_FB was selected by CONFIG_DRM_RADEON
CONFIG_FB=m

These comments should only be emitted for options added by select that
previously were absent or 'is not set'.

/Mikael

2009-07-12 17:14:34

by Cheng Renquan

[permalink] [raw]
Subject: Re: [PATCH 1/6] add symbol value to help find the real depend

On Sun, Jul 12, 2009 at 10:00 AM, Mikael Pettersson<[email protected]> wrote:
[...]
> I like this concept, but I'd like to see it supported with make oldconfig.

'make oldconfig' uses the same 'scripts/kconfig/conf' program as the
'make config' does, which is supported already in this series of
patches,

> Let's say I copy a .config from kernel X into kernel Y (Y>X) and make oldconfig.
> Sometimes the new kernel will enable some previously disabled option, and
> it would be very useful to see WHY.
>
> To take a concrete example, in my 2.6.30 .config I had:
>
> CONFIG_DRM=m
> CONFIG_DRM_RADEON=m
> # CONFIG_FB is not set
>
> which when oldconfig'd in 2.6.31-rc changed to
>
> CONFIG_DRM=m
> CONFIG_DRM_RADEON=m
> CONFIG_FB=m
> (+ some more FB stuff)
>
> In this case it would have been nice to get an explanation that DRM_RADEON
> was responsible for (wrongly, IMO) selecting FB. Something like
>
> # CONFIG_FB was selected by CONFIG_DRM_RADEON
> CONFIG_FB=m
>
> These comments should only be emitted for options added by select that
> previously were absent or 'is not set'.

The conf system is not so smart to find the recent changes (you may
try scripts/diffconfig to diff two .config),

Anyway, if you don't like CONFIG_FB and have no idea why it is
selected, you can navigate to CONFIG_FB in
menuconfig/gconfig/xconfig/config, and find out the real dependency
reason from its help message,

>
> /Mikael
>

--
Cheng Renquan (程任全), from Shenzhen, China

2009-07-18 07:21:54

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 0/6] kbuild configuration system improvements

On Sun, Jul 12, 2009 at 04:11:42PM +0800, Cheng Renquan wrote:
> From: Cheng Renquan <[email protected]>
>
> These patches improve usability of kernel configuration system,
>
> 1. add symbol's value shown accompanied in config item's help message;
> 2. move the real plumbing functions code from mconf.c to menu.c, make them
> be able to be shared with other configuration methods;
> 3. add "symbol's value shown" support for gconfig/xconfig/config;
>
> 0001-add-symbol-value-to-help-find-the-real-depend.patch
> 0002-add-menu_get_ext_help-function-to-display-more-infor.patch
> 0003-menuconfig-improvements.patch
> 0004-make-use-of-menu_get_ext_help-in-gconfig.patch
> 0005-make-use-of-menu_get_ext_help-in-qconfig.patch
> 0006-make-use-of-menu_get_ext_help-in-make-config.patch

I fixed them all up to:
1) include "kconfig:" prefix in subject
2) cc: of Roman Zippel which is kconfig maintainer

There were a few checkpatch issues that I decided to ignore for now.

Please always cc: Roman on kconfig patches as he is the mintainer.

Applied to kbuild-next.git.

Thanks,
Sam

2009-07-18 10:53:48

by Cheng Renquan

[permalink] [raw]
Subject: Re: [PATCH 0/6] kbuild configuration system improvements

On Sat, Jul 18, 2009 at 3:21 PM, Sam Ravnborg<[email protected]> wrote:
> I fixed them all up to:
> 1) include "kconfig:" prefix in subject
> 2) cc: of Roman Zippel which is kconfig maintainer
>
> There were a few checkpatch issues that I decided to ignore for now.
>
> Please always cc: Roman on kconfig patches as he is the mintainer.
>
> Applied to kbuild-next.git.
>
> Thanks,
>        Sam

Sorry, I just mixed up kbuild and kconfig, now I know it and will keep
that in mind in later developement, thank you,

--
Cheng Renquan, Shenzhen, China

2009-07-22 20:45:53

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH 0/6] kbuild configuration system improvements

On Sat, 18 Jul 2009 09:21:38 +0200 Sam Ravnborg wrote:

> On Sun, Jul 12, 2009 at 04:11:42PM +0800, Cheng Renquan wrote:
> > From: Cheng Renquan <[email protected]>
> >
> > These patches improve usability of kernel configuration system,
> >
> > 1. add symbol's value shown accompanied in config item's help message;
> > 2. move the real plumbing functions code from mconf.c to menu.c, make them
> > be able to be shared with other configuration methods;
> > 3. add "symbol's value shown" support for gconfig/xconfig/config;
> >
> > 0001-add-symbol-value-to-help-find-the-real-depend.patch
> > 0002-add-menu_get_ext_help-function-to-display-more-infor.patch
> > 0003-menuconfig-improvements.patch
> > 0004-make-use-of-menu_get_ext_help-in-gconfig.patch
> > 0005-make-use-of-menu_get_ext_help-in-qconfig.patch
> > 0006-make-use-of-menu_get_ext_help-in-make-config.patch
>
> I fixed them all up to:
> 1) include "kconfig:" prefix in subject
> 2) cc: of Roman Zippel which is kconfig maintainer
>
> There were a few checkpatch issues that I decided to ignore for now.
>
> Please always cc: Roman on kconfig patches as he is the mintainer.
>
> Applied to kbuild-next.git.


FWIW, I still get a segfault in gconfig (as I reported several months ago).
I suppose that if it's a real issue, someone else will also see this.

---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/

2009-07-22 21:48:45

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH 0/6] kbuild configuration system improvements

On Wed, Jul 22, 2009 at 01:43:21PM -0700, Randy Dunlap wrote:
> On Sat, 18 Jul 2009 09:21:38 +0200 Sam Ravnborg wrote:
>
> > On Sun, Jul 12, 2009 at 04:11:42PM +0800, Cheng Renquan wrote:
> > > From: Cheng Renquan <[email protected]>
> > >
> > > These patches improve usability of kernel configuration system,
> > >
> > > 1. add symbol's value shown accompanied in config item's help message;
> > > 2. move the real plumbing functions code from mconf.c to menu.c, make them
> > > be able to be shared with other configuration methods;
> > > 3. add "symbol's value shown" support for gconfig/xconfig/config;
> > >
> > > 0001-add-symbol-value-to-help-find-the-real-depend.patch
> > > 0002-add-menu_get_ext_help-function-to-display-more-infor.patch
> > > 0003-menuconfig-improvements.patch
> > > 0004-make-use-of-menu_get_ext_help-in-gconfig.patch
> > > 0005-make-use-of-menu_get_ext_help-in-qconfig.patch
> > > 0006-make-use-of-menu_get_ext_help-in-make-config.patch
> >
> > I fixed them all up to:
> > 1) include "kconfig:" prefix in subject
> > 2) cc: of Roman Zippel which is kconfig maintainer
> >
> > There were a few checkpatch issues that I decided to ignore for now.
> >
> > Please always cc: Roman on kconfig patches as he is the mintainer.
> >
> > Applied to kbuild-next.git.
>
>
> FWIW, I still get a segfault in gconfig (as I reported several months ago).
> I suppose that if it's a real issue, someone else will also see this.

I assumed it was fixed - the changelog patches did
not mention any outstanding issues.

Following fix is needed.

Sam

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 931d782..b74f746 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -528,5 +528,6 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
} else {
str_append(help, nohelp_text);
}
- get_symbol_str(help, sym);
+ if (sym)
+ get_symbol_str(help, sym);
}




>
> ---
> ~Randy
> LPC 2009, Sept. 23-25, Portland, Oregon
> http://linuxplumbersconf.org/2009/
>

2009-07-23 00:15:57

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH 0/6] kbuild configuration system improvements

On Wed, 22 Jul 2009 23:48:42 +0200 Sam Ravnborg wrote:

> On Wed, Jul 22, 2009 at 01:43:21PM -0700, Randy Dunlap wrote:
> > On Sat, 18 Jul 2009 09:21:38 +0200 Sam Ravnborg wrote:
> >
> > > On Sun, Jul 12, 2009 at 04:11:42PM +0800, Cheng Renquan wrote:
> > > > From: Cheng Renquan <[email protected]>
> > > >
> > > > These patches improve usability of kernel configuration system,
> > > >
> > > > 1. add symbol's value shown accompanied in config item's help message;
> > > > 2. move the real plumbing functions code from mconf.c to menu.c, make them
> > > > be able to be shared with other configuration methods;
> > > > 3. add "symbol's value shown" support for gconfig/xconfig/config;
> > > >
> > > > 0001-add-symbol-value-to-help-find-the-real-depend.patch
> > > > 0002-add-menu_get_ext_help-function-to-display-more-infor.patch
> > > > 0003-menuconfig-improvements.patch
> > > > 0004-make-use-of-menu_get_ext_help-in-gconfig.patch
> > > > 0005-make-use-of-menu_get_ext_help-in-qconfig.patch
> > > > 0006-make-use-of-menu_get_ext_help-in-make-config.patch
> > >
> > > I fixed them all up to:
> > > 1) include "kconfig:" prefix in subject
> > > 2) cc: of Roman Zippel which is kconfig maintainer
> > >
> > > There were a few checkpatch issues that I decided to ignore for now.
> > >
> > > Please always cc: Roman on kconfig patches as he is the mintainer.
> > >
> > > Applied to kbuild-next.git.
> >
> >
> > FWIW, I still get a segfault in gconfig (as I reported several months ago).
> > I suppose that if it's a real issue, someone else will also see this.
>
> I assumed it was fixed - the changelog patches did
> not mention any outstanding issues.
>
> Following fix is needed.

Ack, that works. Thanks.


> Sam
>
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index 931d782..b74f746 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -528,5 +528,6 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
> } else {
> str_append(help, nohelp_text);
> }
> - get_symbol_str(help, sym);
> + if (sym)
> + get_symbol_str(help, sym);
> }
>
>
>
>
> >
> > ---
> > ~Randy
> > LPC 2009, Sept. 23-25, Portland, Oregon
> > http://linuxplumbersconf.org/2009/
> >


---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/