* [pull request v2] Pull request for branch yem-kconfig-rc-fixes
@ 2013-05-29 22:24 Yann E. MORIN
2013-05-29 22:24 ` [PATCH 1/3] scripts/config: fix assignment of parameters for short version of --*-after options Yann E. MORIN
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Yann E. MORIN @ 2013-05-29 22:24 UTC (permalink / raw)
To: Michal Marek
Cc: linux-kbuild, linux-kernel, Yann E. MORIN, Dirk Gouders,
Clement Chauplannaz
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Hello Michal, All,
Please pull these three rc-fixes:
- fix key handling in empty menus in mconf
- fix reference to eliminated duplicate expression in kconfig
- fix scripts/config wrt short --*-after options
Changes v1 -> v2:
- add fix for eliminated dups in menu.c
- fix >80 chars in key handling fix
Regards,
Yann E. MORIN
The following changes since commit f722406faae2d073cc1d01063d1123c35425939e:
Linux 3.10-rc1 (2013-05-11 17:14:08 -0700)
are available in the git repository at:
git://gitorious.org/linux-kconfig/linux-kconfig.git yem-kconfig-rc-fixes
for you to fetch changes up to e983b7b17ad1a978e954e6aaa62cf12bfc747883:
kconfig/menu.c: fix multiple references to expressions in menu_add_prop() (2013-05-30 00:14:01 +0200)
----------------------------------------------------------------
Clement Chauplannaz (1):
scripts/config: fix assignment of parameters for short version of --*-after options
Dirk Gouders (2):
mconf: handle keys in empty dialogs
kconfig/menu.c: fix multiple references to expressions in menu_add_prop()
scripts/config | 2 +-
scripts/kconfig/lxdialog/menubox.c | 9 +++++----
scripts/kconfig/mconf.c | 11 ++++++-----
scripts/kconfig/menu.c | 15 ++++++++++++++-
4 files changed, 26 insertions(+), 11 deletions(-)
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] scripts/config: fix assignment of parameters for short version of --*-after options
2013-05-29 22:24 [pull request v2] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
@ 2013-05-29 22:24 ` Yann E. MORIN
2013-05-29 22:24 ` [PATCH 2/3] mconf: handle keys in empty dialogs Yann E. MORIN
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2013-05-29 22:24 UTC (permalink / raw)
To: Michal Marek
Cc: linux-kbuild, linux-kernel, Clement Chauplannaz, Yann E. MORIN
From: Clement Chauplannaz <chauplac@gmail.com>
When --*-after options are used, two parameters are parsed from the
command-line before the adequate function is called:
- the `before' option, after which the new option will be inserted,
- the name of the option to enable/disable/modularise.
With the short version of --*-after options (namely -E, -D, -M), the
parsing step is not performed which leads to processing unset variables.
Add options -E, -D, -M to the test that triggers assignment of parameters
for --*-after options.
Signed-off-by: Clement Chauplannaz <chauplac@gmail.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
scripts/config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/config b/scripts/config
index bb4d3de..a65ecbb 100755
--- a/scripts/config
+++ b/scripts/config
@@ -105,7 +105,7 @@ while [ "$1" != "" ] ; do
;;
--refresh)
;;
- --*-after)
+ --*-after|-E|-D|-M)
checkarg "$1"
A=$ARG
checkarg "$2"
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] mconf: handle keys in empty dialogs
2013-05-29 22:24 [pull request v2] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2013-05-29 22:24 ` [PATCH 1/3] scripts/config: fix assignment of parameters for short version of --*-after options Yann E. MORIN
@ 2013-05-29 22:24 ` Yann E. MORIN
2013-05-29 22:24 ` [PATCH 3/3] kconfig/menu.c: fix multiple references to expressions in menu_add_prop() Yann E. MORIN
2013-06-04 12:50 ` [pull request v2] Pull request for branch yem-kconfig-rc-fixes Michal Marek
3 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2013-05-29 22:24 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, linux-kernel, Dirk Gouders, Yann E. MORIN
From: Dirk Gouders <dirk@gouders.net>
When entering an empty dialog, using the movement keys resulted in
unexpected characters beeing displayed, other keys like "z" and "h"
did not work as expected.
This patch handles the movement keys as well as other keys, especially
"z", "h" and "/".
Signed-off-by: Dirk Gouders <dirk@gouders.net>
[yann.morin.1998@free.fr: keep lines <80 chars, so reorder test]
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
| 9 +++++----
scripts/kconfig/mconf.c | 11 ++++++-----
2 files changed, 11 insertions(+), 9 deletions(-)
--git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 48d382e..38cd69c 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -303,10 +303,11 @@ do_resize:
}
}
- if (i < max_choice ||
- key == KEY_UP || key == KEY_DOWN ||
- key == '-' || key == '+' ||
- key == KEY_PPAGE || key == KEY_NPAGE) {
+ if (item_count() != 0 &&
+ (i < max_choice ||
+ key == KEY_UP || key == KEY_DOWN ||
+ key == '-' || key == '+' ||
+ key == KEY_PPAGE || key == KEY_NPAGE)) {
/* Remove highligt of current item */
print_item(scroll + choice, choice, FALSE);
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 387dc8d..a69cbd7 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -670,11 +670,12 @@ static void conf(struct menu *menu, struct menu *active_menu)
active_menu, &s_scroll);
if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
break;
- if (!item_activate_selected())
- continue;
- if (!item_tag())
- continue;
-
+ if (item_count() != 0) {
+ if (!item_activate_selected())
+ continue;
+ if (!item_tag())
+ continue;
+ }
submenu = item_data();
active_menu = item_data();
if (submenu)
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] kconfig/menu.c: fix multiple references to expressions in menu_add_prop()
2013-05-29 22:24 [pull request v2] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2013-05-29 22:24 ` [PATCH 1/3] scripts/config: fix assignment of parameters for short version of --*-after options Yann E. MORIN
2013-05-29 22:24 ` [PATCH 2/3] mconf: handle keys in empty dialogs Yann E. MORIN
@ 2013-05-29 22:24 ` Yann E. MORIN
2013-06-04 12:50 ` [pull request v2] Pull request for branch yem-kconfig-rc-fixes Michal Marek
3 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2013-05-29 22:24 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, linux-kernel, Dirk Gouders, Yann E. MORIN
From: Dirk Gouders <dirk@gouders.net>
menu_add_prop() applies upper menus' visibilities to actual prompts
by AND-ing the prompts visibilities with the upper menus ones.
This creates a further reference to the menu's visibilities and when
the expression reduction functions do their work, they may remove or
modify expressions that have multiple references, thus causing
unpredictable side-effects.
The following example Kconfig constructs a case where this causes
problems: a menu and a prompt which's visibilities depend on the same
symbol. When invoking mconf with this Kconfig and pressing "Z" we
see a problem caused by a free'd expression still referenced by the
menu's visibility:
------------------------------------------------------------------------
mainmenu "Kconfig Testing Configuration"
config VISIBLE
def_bool n
config Placeholder
bool "Place holder"
menu "Invisible"
visible if VISIBLE
config TEST_VAR
bool "Test option" if VISIBLE
endmenu
------------------------------------------------------------------------
This patch fixes this problem by creating copies of the menu's
visibility expressions before AND-ing them with the prompt's one.
Signed-off-by: Dirk Gouders <dirk@gouders.net>
[yann.morin.1998@free.fr: move variable into its block-scope,
keep lines <80 chars, typo]
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
| 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
--git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index b5c7d90..fd3f018 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -146,11 +146,24 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
struct menu *menu = current_entry;
while ((menu = menu->parent) != NULL) {
+ struct expr *dup_expr;
+
if (!menu->visibility)
continue;
+ /*
+ * Do not add a reference to the
+ * menu's visibility expression but
+ * use a copy of it. Otherwise the
+ * expression reduction functions
+ * will modify expressions that have
+ * multiple references which can
+ * cause unwanted side effects.
+ */
+ dup_expr = expr_copy(menu->visibility);
+
prop->visible.expr
= expr_alloc_and(prop->visible.expr,
- menu->visibility);
+ dup_expr);
}
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [pull request v2] Pull request for branch yem-kconfig-rc-fixes
2013-05-29 22:24 [pull request v2] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
` (2 preceding siblings ...)
2013-05-29 22:24 ` [PATCH 3/3] kconfig/menu.c: fix multiple references to expressions in menu_add_prop() Yann E. MORIN
@ 2013-06-04 12:50 ` Michal Marek
3 siblings, 0 replies; 5+ messages in thread
From: Michal Marek @ 2013-06-04 12:50 UTC (permalink / raw)
To: Yann E. MORIN
Cc: linux-kbuild, linux-kernel, Dirk Gouders, Clement Chauplannaz
On 30.5.2013 00:24, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Hello Michal, All,
>
> Please pull these three rc-fixes:
> - fix key handling in empty menus in mconf
> - fix reference to eliminated duplicate expression in kconfig
> - fix scripts/config wrt short --*-after options
Sorry for the delay. This is in kbuild.git#rc-fixes now, thanks.
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-04 12:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-29 22:24 [pull request v2] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2013-05-29 22:24 ` [PATCH 1/3] scripts/config: fix assignment of parameters for short version of --*-after options Yann E. MORIN
2013-05-29 22:24 ` [PATCH 2/3] mconf: handle keys in empty dialogs Yann E. MORIN
2013-05-29 22:24 ` [PATCH 3/3] kconfig/menu.c: fix multiple references to expressions in menu_add_prop() Yann E. MORIN
2013-06-04 12:50 ` [pull request v2] Pull request for branch yem-kconfig-rc-fixes Michal Marek
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.