From 8d9dfe8276750aaf30ca1b59b4c3f9349377cb6e Mon Sep 17 00:00:00 2001 From: Martin Walch Date: Thu, 3 Oct 2013 17:28:14 +0200 Subject: kconfig: fix trivial typos and update mconf documentation This fixes lots of typos in comments and strings. It also updates the documentation strings in mconf to reflect the changes in the user interface from the two commits 6364fd0cb1e4c7f72b974613e0cf5744ae4d2cb2 menuconfig: Add Save/Load buttons 1bdbac478a858d2aa73a6784c7c2e09de0f6d06b menuconfig: Get rid of the top-level entries for "Load an Alternate/Save an Alternate" And it updates the layout of the example search result, i. e. moves down the "Defined at" and "Depends on" lines and adds a symbol state ([=n]) to the symbol in the "Selected by" line. Furthermore, the help texts now should fit in 80 columns again when viewed in mconf. Signed-off-by: Martin Walch Reviewed-by: Jean Delvare Reviewed-by: Wang YanQing Signed-off-by: "Yann E. MORIN" --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/kconfig/menu.c') diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index c1d53200c30..b9701010de8 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -597,7 +597,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, } /* - * get peoperty of type P_SYMBOL + * get property of type P_SYMBOL */ static struct property *get_symbol_prop(struct symbol *sym) { -- cgit v1.2.3-70-g09d2 From 57540f1dea6580fda0debaf3704d1b0e928a120e Mon Sep 17 00:00:00 2001 From: Martin Walch Date: Thu, 3 Oct 2013 18:32:02 +0200 Subject: kconfig: adjust warning message for conflicting types Each symbol must have exactly one type assigned. However, if a symbol happens to have two different types assigned at runtime, a warning is printed and the first type is preserved while the second type is being ignored. The warning message says type of redefined from to which may be misleading as it may create the impression that the second type replaces the first type. This patch clarifies this by changing the warning to ignoring type redefinition of from to Signed-off-by: Martin Walch Acked-by: Wang YanQing Reviewed-by: "Yann E. MORIN" Signed-off-by: "Yann E. MORIN" --- scripts/kconfig/menu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/kconfig/menu.c') diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index b9701010de8..9e69f193483 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -119,9 +119,10 @@ void menu_set_type(int type) sym->type = type; return; } - menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'", - sym->name ? sym->name : "", - sym_type_name(sym->type), sym_type_name(type)); + menu_warn(current_entry, + "ignoring type redefinition of '%s' from '%s' to '%s'", + sym->name ? sym->name : "", + sym_type_name(sym->type), sym_type_name(type)); } struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) -- cgit v1.2.3-70-g09d2 From 503c823048e81cc85c0e9d8c297cc70203e335e5 Mon Sep 17 00:00:00 2001 From: Martin Walch Date: Thu, 3 Oct 2013 18:35:16 +0200 Subject: kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len The struct gstr has a capacity that may differ from the actual string length. However, a string manipulation in the function search_conf made the assumption that it is the same, which led to messing up some search results, especially when the content of the gstr in use had not yet reached at least 63 chars. Signed-off-by: Martin Walch Acked-by: Wang YanQing Acked-by: Benjamin Poirier Reviewed-by: "Yann E. MORIN" Signed-off-by: "Yann E. MORIN" --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/kconfig/menu.c') diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 9e69f193483..db1512ae30c 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -584,7 +584,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, for (j = 4; --i >= 0; j += 2) { menu = submenu[i]; if (head && location && menu == location) - jump->offset = r->len - 1; + jump->offset = strlen(r->s); str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); if (menu->sym) { -- cgit v1.2.3-70-g09d2