Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Roman Zippel
Hi,

On Sun, 16 Sep 2007, Sam Ravnborg wrote:

> > On Sun, 16 Sep 2007, Sam Ravnborg wrote:
> > 
> > > But can you take a look at distingushing between non-selectable options
> > > due to dependency issues and seleted-by symbols.
> > 
> > Do you have an example in mind? If a symbol is not changable, but still 
> > visible, a select is usually involved.
> 
> On i86_64 (but I think the arch does not matter).
> make defconfig
> make menuconfig
> 
> At top-level menu I see:
> --- Enable the block layer  --->
> 
> In block/Kconfig we have:
> menuconfig BLOCK
>bool "Enable the block layer" if EMBEDDED
>default y
> 
> If EMBEDDED == n then we see the above.
> And this was my first experience with this patch - and it
> took me some thoughts to realise it was the "if EMBEDDED" part
> that made it look like -*-

Indeed, I forgot about this case. Here it's actually the menu entry of a 
symbol that is forced to be visible, because a child entry is visible.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Matej Laitl
On Sunday 16 of September 2007 20:41:10 Sam Ravnborg wrote:
> On Sat, Sep 15, 2007 at 08:04:10PM +0200, Matej Laitl wrote:
> > menuconfig currently represents options implied by another option ('select'
> > directive in Kconfig) by prefixing them with '---'. Unfortunately the same
> > notation is used for comments.
> This is easy to fix - example below.
> 
> Now a comment looks like this
> 
>*** This is a comment ***
> 
> Notice the three leading spaces which is where '---' was before.
> 
>   Sam

Definitely this is the best solution for the comment ambiguity.

So my patch turned out to solve only these questions:
"What does the '--- Wireless extensions' mean? Included or excluded?"
"Why I cannot disable ' Option XXX'?"

Dunno if it is still worth merging. (but even if not, it at least made you
solve the comments problem) :)

Matěj.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Sam Ravnborg
On Sat, Sep 15, 2007 at 08:04:10PM +0200, Matej Laitl wrote:
> menuconfig currently represents options implied by another option ('select'
> directive in Kconfig) by prefixing them with '---'. Unfortunately the same
> notation is used for comments.
This is easy to fix - example below.

Now a comment looks like this

   *** This is a comment ***

Notice the three leading spaces which is where '---' was before.

Sam

diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854e..2ee12a7 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -481,6 +481,14 @@ static void build_conf(struct menu *menu)
if (single_menu_mode && menu->data)
goto conf_childs;
return;
+   case P_COMMENT:
+   if (prompt) {
+   child_count++;
+   item_make("   %*c*** %s ***", indent + 
1, ' ', prompt);
+   item_set_tag(':');
+   item_set_data(menu);
+   }
+   break;
default:
if (prompt) {
child_count++;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Sam Ravnborg
On Sun, Sep 16, 2007 at 07:10:06PM +0200, Roman Zippel wrote:
> Hi,
> 
> On Sun, 16 Sep 2007, Sam Ravnborg wrote:
> 
> > But can you take a look at distingushing between non-selectable options
> > due to dependency issues and seleted-by symbols.
> 
> Do you have an example in mind? If a symbol is not changable, but still 
> visible, a select is usually involved.

On i86_64 (but I think the arch does not matter).
make defconfig
make menuconfig

At top-level menu I see:
--- Enable the block layer  --->

In block/Kconfig we have:
menuconfig BLOCK
   bool "Enable the block layer" if EMBEDDED
   default y

If EMBEDDED == n then we see the above.
And this was my first experience with this patch - and it
took me some thoughts to realise it was the "if EMBEDDED" part
that made it look like -*-

So maybe not something we see in many places but it is
there in the top-level menu.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Roman Zippel
Hi,

On Sun, 16 Sep 2007, Sam Ravnborg wrote:

> But can you take a look at distingushing between non-selectable options
> due to dependency issues and seleted-by symbols.

Do you have an example in mind? If a symbol is not changable, but still 
visible, a select is usually involved.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Roman Zippel
Hi,

On Sat, 15 Sep 2007, Matej Laitl wrote:

> menuconfig currently represents options implied by another option ('select'
> directive in Kconfig) by prefixing them with '---'. Unfortunately the same
> notation is used for comments.
> 
> This patch changes notation of selected-by-another items by introducing 2 new
> representations for implied options:
> {*} or {M} for options selected by another modularized one, thus builtin or
> module capable,
> -*- or -M- for options that cannot be at the moment changed by user.

I shortly considered doing something like this, but initially I wanted to
keep it simple. It's a compromise between overloading the user interface
with information and keeping it simple. That's the only concern I have
with it, but if everyone else likes I don't mind either. :)

> Signed-off-by: Matěj Laitl <[EMAIL PROTECTED]>

Signed-off-by: Roman Zippel <[EMAIL PROTECTED]>

bye, Roman

Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Sam Ravnborg
On Sat, Sep 15, 2007 at 08:04:10PM +0200, Matej Laitl wrote:
> menuconfig currently represents options implied by another option ('select'
> directive in Kconfig) by prefixing them with '---'. Unfortunately the same
> notation is used for comments.
> 
> This patch changes notation of selected-by-another items by introducing 2 new
> representations for implied options:
> {*} or {M} for options selected by another modularized one, thus builtin or
> module capable,
> -*- or -M- for options that cannot be at the moment changed by user.

With this patch we can now distingush between comments and menulines
that the user cannot cahnge.
As one of the major issues with kconfig is the evil select handling
it would have been much preferred to distingush between lines
that are selected-by and lines that cannot be changed for other
reasons.
The block menu is a good example where we do not sue select. It is marked
'---' because it is default y if EMBEDDED is not selected.

So the intention is clear and your changed interface (sym_get_min_val())
look OK.
But can you take a look at distingushing between non-selectable options
due to dependency issues and seleted-by symbols.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Sam Ravnborg
On Sat, Sep 15, 2007 at 08:04:10PM +0200, Matej Laitl wrote:
 menuconfig currently represents options implied by another option ('select'
 directive in Kconfig) by prefixing them with '---'. Unfortunately the same
 notation is used for comments.
 
 This patch changes notation of selected-by-another items by introducing 2 new
 representations for implied options:
 {*} or {M} for options selected by another modularized one, thus builtin or
 module capable,
 -*- or -M- for options that cannot be at the moment changed by user.

With this patch we can now distingush between comments and menulines
that the user cannot cahnge.
As one of the major issues with kconfig is the evil select handling
it would have been much preferred to distingush between lines
that are selected-by and lines that cannot be changed for other
reasons.
The block menu is a good example where we do not sue select. It is marked
'---' because it is default y if EMBEDDED is not selected.

So the intention is clear and your changed interface (sym_get_min_val())
look OK.
But can you take a look at distingushing between non-selectable options
due to dependency issues and seleted-by symbols.

Sam
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Roman Zippel
Hi,

On Sat, 15 Sep 2007, Matej Laitl wrote:

 menuconfig currently represents options implied by another option ('select'
 directive in Kconfig) by prefixing them with '---'. Unfortunately the same
 notation is used for comments.
 
 This patch changes notation of selected-by-another items by introducing 2 new
 representations for implied options:
 {*} or {M} for options selected by another modularized one, thus builtin or
 module capable,
 -*- or -M- for options that cannot be at the moment changed by user.

I shortly considered doing something like this, but initially I wanted to
keep it simple. It's a compromise between overloading the user interface
with information and keeping it simple. That's the only concern I have
with it, but if everyone else likes I don't mind either. :)

 Signed-off-by: Matěj Laitl [EMAIL PROTECTED]

Signed-off-by: Roman Zippel [EMAIL PROTECTED]

bye, Roman

Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Roman Zippel
Hi,

On Sun, 16 Sep 2007, Sam Ravnborg wrote:

 But can you take a look at distingushing between non-selectable options
 due to dependency issues and seleted-by symbols.

Do you have an example in mind? If a symbol is not changable, but still 
visible, a select is usually involved.

bye, Roman
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Sam Ravnborg
On Sun, Sep 16, 2007 at 07:10:06PM +0200, Roman Zippel wrote:
 Hi,
 
 On Sun, 16 Sep 2007, Sam Ravnborg wrote:
 
  But can you take a look at distingushing between non-selectable options
  due to dependency issues and seleted-by symbols.
 
 Do you have an example in mind? If a symbol is not changable, but still 
 visible, a select is usually involved.

On i86_64 (but I think the arch does not matter).
make defconfig
make menuconfig

At top-level menu I see:
--- Enable the block layer  ---

In block/Kconfig we have:
menuconfig BLOCK
   bool Enable the block layer if EMBEDDED
   default y

If EMBEDDED == n then we see the above.
And this was my first experience with this patch - and it
took me some thoughts to realise it was the if EMBEDDED part
that made it look like -*-

So maybe not something we see in many places but it is
there in the top-level menu.

Sam
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Sam Ravnborg
On Sat, Sep 15, 2007 at 08:04:10PM +0200, Matej Laitl wrote:
 menuconfig currently represents options implied by another option ('select'
 directive in Kconfig) by prefixing them with '---'. Unfortunately the same
 notation is used for comments.
This is easy to fix - example below.

Now a comment looks like this

   *** This is a comment ***

Notice the three leading spaces which is where '---' was before.

Sam

diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854e..2ee12a7 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -481,6 +481,14 @@ static void build_conf(struct menu *menu)
if (single_menu_mode  menu-data)
goto conf_childs;
return;
+   case P_COMMENT:
+   if (prompt) {
+   child_count++;
+   item_make(   %*c*** %s ***, indent + 
1, ' ', prompt);
+   item_set_tag(':');
+   item_set_data(menu);
+   }
+   break;
default:
if (prompt) {
child_count++;
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Matej Laitl
On Sunday 16 of September 2007 20:41:10 Sam Ravnborg wrote:
 On Sat, Sep 15, 2007 at 08:04:10PM +0200, Matej Laitl wrote:
  menuconfig currently represents options implied by another option ('select'
  directive in Kconfig) by prefixing them with '---'. Unfortunately the same
  notation is used for comments.
 This is easy to fix - example below.
 
 Now a comment looks like this
 
*** This is a comment ***
 
 Notice the three leading spaces which is where '---' was before.
 
   Sam

Definitely this is the best solution for the comment ambiguity.

So my patch turned out to solve only these questions:
What does the '--- Wireless extensions' mean? Included or excluded?
Why I cannot disable 'M Option XXX'?

Dunno if it is still worth merging. (but even if not, it at least made you
solve the comments problem) :)

Matěj.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-16 Thread Roman Zippel
Hi,

On Sun, 16 Sep 2007, Sam Ravnborg wrote:

  On Sun, 16 Sep 2007, Sam Ravnborg wrote:
  
   But can you take a look at distingushing between non-selectable options
   due to dependency issues and seleted-by symbols.
  
  Do you have an example in mind? If a symbol is not changable, but still 
  visible, a select is usually involved.
 
 On i86_64 (but I think the arch does not matter).
 make defconfig
 make menuconfig
 
 At top-level menu I see:
 --- Enable the block layer  ---
 
 In block/Kconfig we have:
 menuconfig BLOCK
bool Enable the block layer if EMBEDDED
default y
 
 If EMBEDDED == n then we see the above.
 And this was my first experience with this patch - and it
 took me some thoughts to realise it was the if EMBEDDED part
 that made it look like -*-

Indeed, I forgot about this case. Here it's actually the menu entry of a 
symbol that is forced to be visible, because a child entry is visible.

bye, Roman
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Randy Dunlap
On Sat, 15 Sep 2007 20:04:10 +0200 Matej Laitl wrote:

> menuconfig currently represents options implied by another option ('select'
> directive in Kconfig) by prefixing them with '---'. Unfortunately the same
> notation is used for comments.
> 
> This patch changes notation of selected-by-another items by introducing 2 new
> representations for implied options:
> {*} or {M} for options selected by another modularized one, thus builtin or
> module capable,
> -*- or -M- for options that cannot be at the moment changed by user.
> 
> The idea is to represent actual capability of the option by braces (dashes)
> around and to always report actual state by * or M inside.
> 
> Signed-off-by: Matěj Laitl <[EMAIL PROTECTED]>
> ---
> Changes since v1:
> * introduce sym_get_minimal_value(), so that access to struct symbol is 
> abstracted.
> * change also menuconfig's window header text to reflect the change. I'm 
> still 
> not sure if the wording is optimal.

I don't see any problems with the wording other than I'm not very
strongly in favor of the word "implied".  I don't have a better
word to use other than "selected", but that's just an implementation
detail, not especially user friendly.


> v1 was acked by Randy Dunlap, I'm not sure if it's appropriate to keep 
> Acked-by when patch changes. (teach me please)

Good question.  I think you did it correctly.

Acked-by: Randy Dunlap <[EMAIL PROTECTED]>

>  scripts/kconfig/lkc_proto.h |1 +
>  scripts/kconfig/mconf.c |   21 +
>  scripts/kconfig/symbol.c|5 +
>  3 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
> index 4d09f6d..98642bc 100644
> --- a/scripts/kconfig/lkc_proto.h
> +++ b/scripts/kconfig/lkc_proto.h
> @@ -34,6 +34,7 @@ P(sym_string_valid,bool,(struct symbol *sym, const char 
> *newval));
>  P(sym_string_within_range,bool,(struct symbol *sym, const char *str));
>  P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
>  P(sym_is_changable,bool,(struct symbol *sym));
> +P(sym_get_minimal_value,tristate,(struct symbol *sym));
>  P(sym_get_choice_prop,struct property *,(struct symbol *sym));
>  P(sym_get_default_prop,struct property *,(struct symbol *sym));
>  P(sym_get_string_value,const char *,(struct symbol *sym));
> diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
> index bc5854e..77ab552 100644
> --- a/scripts/kconfig/mconf.c
> +++ b/scripts/kconfig/mconf.c
> @@ -35,9 +35,13 @@ static const char mconf_readme[] = N_(
>  "kernel parameters which are not really features, but must be\n"
>  "entered in as decimal or hexadecimal numbers or possibly text.\n"
>  "\n"
> -"Menu items beginning with [*],  or [ ] represent features\n"
> -"configured to be built in, modularized or removed respectively.\n"
> -"Pointed brackets <> represent module capable features.\n"
> +"Menu items beginning with following braces represent features that\n"
> +"  [ ] can be built in or removed\n"
> +"  < > can be built in, modularized or removed\n"
> +"  { } can be built in or modularized (selected by other feature)\n"
> +"  - - are selected by other feature,\n"
> +"while *, M or whitespace inside braces means to build in, build as\n"
> +"a module or to exclude the feature respectively.\n"
>  "\n"
>  "To change any of these features, highlight it with the cursor\n"
>  "keys and press  to build it in,  to make it a module or\n"
> @@ -178,9 +182,9 @@ menu_instructions[] = N_(
>   "Arrow keys navigate the menu.  "
>   " selects submenus --->.  "
>   "Highlighted letters are hotkeys.  "
> - "Pressing  includes,  excludes,  modularizes features.  "
> + "Pressing  includes (*),  modularizes (M),  excludes features 
> ( ).  "
>   "Press  to exit,  for Help,  for Search.  "
> - "Legend: [*] built-in  [ ] excluded   module  < > module capable"),
> + "Legend: [*] built-in, < > module capable, { } implied, -*- forced."),
>  radiolist_instructions[] = N_(
>   "Use the arrow keys to navigate this window or "
>   "press the hotkey of the item you wish to select "
> @@ -560,7 +564,7 @@ static void build_conf(struct menu *menu)
>   if (sym_is_changable(sym))
>   item_make("[%c]", val == no ? ' ' : 
> '*');
>   else
> - item_make("---");
> + item_make("-%c-", val == no ? ' ' : 
> '*');
>   item_set_tag('t');
>   item_set_data(menu);
>   break;
> @@ -571,9 +575,10 @@ static void build_conf(struct menu *menu)
>   default:  ch = ' '; break;
>   }
>   if (sym_is_changable(sym))
> - item_make("<%c>", ch);
> + 

Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Matej Laitl
On Saturday 15 of September 2007 20:38:14 you wrote:
> On Sep 15 2007 20:04, Matej Laitl wrote:
> >This patch changes notation of selected-by-another items by introducing 2
> > new representations for implied options:
> >{*} or {M} for options selected by another modularized one, thus builtin
> > or module capable,
> >-*- or -M- for options that cannot be at the moment changed by user.
>
> This gets rid of the ambiguous ---, does not it? (If so, nice!)

Definately. You may try it, the patch is against current Linus's HEAD, but may 
apply cleanly also against 2.6.22 as none of the files changed since. (AFAIK, 
too lazy to check it)

Regards,
 Matej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Jan Engelhardt

On Sep 15 2007 20:04, Matej Laitl wrote:
>
>This patch changes notation of selected-by-another items by introducing 2 new
>representations for implied options:
>{*} or {M} for options selected by another modularized one, thus builtin or
>module capable,
>-*- or -M- for options that cannot be at the moment changed by user.

This gets rid of the ambiguous ---, does not it? (If so, nice!)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Matej Laitl
On Saturday 15 of September 2007 20:04:10 Matej Laitl wrote:
> menuconfig currently represents options implied by another option ('select'
> directive in Kconfig) by prefixing them with '---'. Unfortunately the same
> notation is used for comments.
>
> (...)

Oh please reply to my address [EMAIL PROTECTED] I mismatched Reply-To and 
In-Reply-To e-mail headers when trying to stick the message to original 
thread.

Sorry for the noise and inconvenience I caused.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Matej Laitl
menuconfig currently represents options implied by another option ('select'
directive in Kconfig) by prefixing them with '---'. Unfortunately the same
notation is used for comments.

This patch changes notation of selected-by-another items by introducing 2 new
representations for implied options:
{*} or {M} for options selected by another modularized one, thus builtin or
module capable,
-*- or -M- for options that cannot be at the moment changed by user.

The idea is to represent actual capability of the option by braces (dashes)
around and to always report actual state by * or M inside.

Signed-off-by: Matěj Laitl <[EMAIL PROTECTED]>
---
Changes since v1:
* introduce sym_get_minimal_value(), so that access to struct symbol is 
abstracted.
* change also menuconfig's window header text to reflect the change. I'm still 
not sure if the wording is optimal.

v1 was acked by Randy Dunlap, I'm not sure if it's appropriate to keep 
Acked-by when patch changes. (teach me please)

 scripts/kconfig/lkc_proto.h |1 +
 scripts/kconfig/mconf.c |   21 +
 scripts/kconfig/symbol.c|5 +
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index 4d09f6d..98642bc 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -34,6 +34,7 @@ P(sym_string_valid,bool,(struct symbol *sym, const char 
*newval));
 P(sym_string_within_range,bool,(struct symbol *sym, const char *str));
 P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
 P(sym_is_changable,bool,(struct symbol *sym));
+P(sym_get_minimal_value,tristate,(struct symbol *sym));
 P(sym_get_choice_prop,struct property *,(struct symbol *sym));
 P(sym_get_default_prop,struct property *,(struct symbol *sym));
 P(sym_get_string_value,const char *,(struct symbol *sym));
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854e..77ab552 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -35,9 +35,13 @@ static const char mconf_readme[] = N_(
 "kernel parameters which are not really features, but must be\n"
 "entered in as decimal or hexadecimal numbers or possibly text.\n"
 "\n"
-"Menu items beginning with [*],  or [ ] represent features\n"
-"configured to be built in, modularized or removed respectively.\n"
-"Pointed brackets <> represent module capable features.\n"
+"Menu items beginning with following braces represent features that\n"
+"  [ ] can be built in or removed\n"
+"  < > can be built in, modularized or removed\n"
+"  { } can be built in or modularized (selected by other feature)\n"
+"  - - are selected by other feature,\n"
+"while *, M or whitespace inside braces means to build in, build as\n"
+"a module or to exclude the feature respectively.\n"
 "\n"
 "To change any of these features, highlight it with the cursor\n"
 "keys and press  to build it in,  to make it a module or\n"
@@ -178,9 +182,9 @@ menu_instructions[] = N_(
"Arrow keys navigate the menu.  "
" selects submenus --->.  "
"Highlighted letters are hotkeys.  "
-   "Pressing  includes,  excludes,  modularizes features.  "
+   "Pressing  includes (*),  modularizes (M),  excludes features 
( ).  "
"Press  to exit,  for Help,  for Search.  "
-   "Legend: [*] built-in  [ ] excluded   module  < > module capable"),
+   "Legend: [*] built-in, < > module capable, { } implied, -*- forced."),
 radiolist_instructions[] = N_(
"Use the arrow keys to navigate this window or "
"press the hotkey of the item you wish to select "
@@ -560,7 +564,7 @@ static void build_conf(struct menu *menu)
if (sym_is_changable(sym))
item_make("[%c]", val == no ? ' ' : 
'*');
else
-   item_make("---");
+   item_make("-%c-", val == no ? ' ' : 
'*');
item_set_tag('t');
item_set_data(menu);
break;
@@ -571,9 +575,10 @@ static void build_conf(struct menu *menu)
default:  ch = ' '; break;
}
if (sym_is_changable(sym))
-   item_make("<%c>", ch);
+   item_make((sym_get_minimal_value(sym) 
== mod) ?
+ "{%c}" : "<%c>", ch);
else
-   item_make("---");
+   item_make("-%c-", ch);
item_set_tag('t');
item_set_data(menu);
break;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index c35dcc5..b9832d0 100644
--- 

[PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Matej Laitl
menuconfig currently represents options implied by another option ('select'
directive in Kconfig) by prefixing them with '---'. Unfortunately the same
notation is used for comments.

This patch changes notation of selected-by-another items by introducing 2 new
representations for implied options:
{*} or {M} for options selected by another modularized one, thus builtin or
module capable,
-*- or -M- for options that cannot be at the moment changed by user.

The idea is to represent actual capability of the option by braces (dashes)
around and to always report actual state by * or M inside.

Signed-off-by: Matěj Laitl [EMAIL PROTECTED]
---
Changes since v1:
* introduce sym_get_minimal_value(), so that access to struct symbol is 
abstracted.
* change also menuconfig's window header text to reflect the change. I'm still 
not sure if the wording is optimal.

v1 was acked by Randy Dunlap, I'm not sure if it's appropriate to keep 
Acked-by when patch changes. (teach me please)

 scripts/kconfig/lkc_proto.h |1 +
 scripts/kconfig/mconf.c |   21 +
 scripts/kconfig/symbol.c|5 +
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index 4d09f6d..98642bc 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -34,6 +34,7 @@ P(sym_string_valid,bool,(struct symbol *sym, const char 
*newval));
 P(sym_string_within_range,bool,(struct symbol *sym, const char *str));
 P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
 P(sym_is_changable,bool,(struct symbol *sym));
+P(sym_get_minimal_value,tristate,(struct symbol *sym));
 P(sym_get_choice_prop,struct property *,(struct symbol *sym));
 P(sym_get_default_prop,struct property *,(struct symbol *sym));
 P(sym_get_string_value,const char *,(struct symbol *sym));
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854e..77ab552 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -35,9 +35,13 @@ static const char mconf_readme[] = N_(
 kernel parameters which are not really features, but must be\n
 entered in as decimal or hexadecimal numbers or possibly text.\n
 \n
-Menu items beginning with [*], M or [ ] represent features\n
-configured to be built in, modularized or removed respectively.\n
-Pointed brackets  represent module capable features.\n
+Menu items beginning with following braces represent features that\n
+  [ ] can be built in or removed\n
+can be built in, modularized or removed\n
+  { } can be built in or modularized (selected by other feature)\n
+  - - are selected by other feature,\n
+while *, M or whitespace inside braces means to build in, build as\n
+a module or to exclude the feature respectively.\n
 \n
 To change any of these features, highlight it with the cursor\n
 keys and press Y to build it in, M to make it a module or\n
@@ -178,9 +182,9 @@ menu_instructions[] = N_(
Arrow keys navigate the menu.  
Enter selects submenus ---.  
Highlighted letters are hotkeys.  
-   Pressing Y includes, N excludes, M modularizes features.  
+   Pressing Y includes (*), M modularizes (M), N excludes features 
( ).  
Press EscEsc to exit, ? for Help, / for Search.  
-   Legend: [*] built-in  [ ] excluded  M modulemodule capable),
+   Legend: [*] built-in,   module capable, { } implied, -*- forced.),
 radiolist_instructions[] = N_(
Use the arrow keys to navigate this window or 
press the hotkey of the item you wish to select 
@@ -560,7 +564,7 @@ static void build_conf(struct menu *menu)
if (sym_is_changable(sym))
item_make([%c], val == no ? ' ' : 
'*');
else
-   item_make(---);
+   item_make(-%c-, val == no ? ' ' : 
'*');
item_set_tag('t');
item_set_data(menu);
break;
@@ -571,9 +575,10 @@ static void build_conf(struct menu *menu)
default:  ch = ' '; break;
}
if (sym_is_changable(sym))
-   item_make(%c, ch);
+   item_make((sym_get_minimal_value(sym) 
== mod) ?
+ {%c} : %c, ch);
else
-   item_make(---);
+   item_make(-%c-, ch);
item_set_tag('t');
item_set_data(menu);
break;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index c35dcc5..b9832d0 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -643,6 +643,11 @@ 

Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Matej Laitl
On Saturday 15 of September 2007 20:04:10 Matej Laitl wrote:
 menuconfig currently represents options implied by another option ('select'
 directive in Kconfig) by prefixing them with '---'. Unfortunately the same
 notation is used for comments.

 (...)

Oh please reply to my address [EMAIL PROTECTED] I mismatched Reply-To and 
In-Reply-To e-mail headers when trying to stick the message to original 
thread.

Sorry for the noise and inconvenience I caused.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Jan Engelhardt

On Sep 15 2007 20:04, Matej Laitl wrote:

This patch changes notation of selected-by-another items by introducing 2 new
representations for implied options:
{*} or {M} for options selected by another modularized one, thus builtin or
module capable,
-*- or -M- for options that cannot be at the moment changed by user.

This gets rid of the ambiguous ---, does not it? (If so, nice!)

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Matej Laitl
On Saturday 15 of September 2007 20:38:14 you wrote:
 On Sep 15 2007 20:04, Matej Laitl wrote:
 This patch changes notation of selected-by-another items by introducing 2
  new representations for implied options:
 {*} or {M} for options selected by another modularized one, thus builtin
  or module capable,
 -*- or -M- for options that cannot be at the moment changed by user.

 This gets rid of the ambiguous ---, does not it? (If so, nice!)

Definately. You may try it, the patch is against current Linus's HEAD, but may 
apply cleanly also against 2.6.22 as none of the files changed since. (AFAIK, 
too lazy to check it)

Regards,
 Matej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments

2007-09-15 Thread Randy Dunlap
On Sat, 15 Sep 2007 20:04:10 +0200 Matej Laitl wrote:

 menuconfig currently represents options implied by another option ('select'
 directive in Kconfig) by prefixing them with '---'. Unfortunately the same
 notation is used for comments.
 
 This patch changes notation of selected-by-another items by introducing 2 new
 representations for implied options:
 {*} or {M} for options selected by another modularized one, thus builtin or
 module capable,
 -*- or -M- for options that cannot be at the moment changed by user.
 
 The idea is to represent actual capability of the option by braces (dashes)
 around and to always report actual state by * or M inside.
 
 Signed-off-by: Matěj Laitl [EMAIL PROTECTED]
 ---
 Changes since v1:
 * introduce sym_get_minimal_value(), so that access to struct symbol is 
 abstracted.
 * change also menuconfig's window header text to reflect the change. I'm 
 still 
 not sure if the wording is optimal.

I don't see any problems with the wording other than I'm not very
strongly in favor of the word implied.  I don't have a better
word to use other than selected, but that's just an implementation
detail, not especially user friendly.


 v1 was acked by Randy Dunlap, I'm not sure if it's appropriate to keep 
 Acked-by when patch changes. (teach me please)

Good question.  I think you did it correctly.

Acked-by: Randy Dunlap [EMAIL PROTECTED]

  scripts/kconfig/lkc_proto.h |1 +
  scripts/kconfig/mconf.c |   21 +
  scripts/kconfig/symbol.c|5 +
  3 files changed, 19 insertions(+), 8 deletions(-)
 
 diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
 index 4d09f6d..98642bc 100644
 --- a/scripts/kconfig/lkc_proto.h
 +++ b/scripts/kconfig/lkc_proto.h
 @@ -34,6 +34,7 @@ P(sym_string_valid,bool,(struct symbol *sym, const char 
 *newval));
  P(sym_string_within_range,bool,(struct symbol *sym, const char *str));
  P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
  P(sym_is_changable,bool,(struct symbol *sym));
 +P(sym_get_minimal_value,tristate,(struct symbol *sym));
  P(sym_get_choice_prop,struct property *,(struct symbol *sym));
  P(sym_get_default_prop,struct property *,(struct symbol *sym));
  P(sym_get_string_value,const char *,(struct symbol *sym));
 diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
 index bc5854e..77ab552 100644
 --- a/scripts/kconfig/mconf.c
 +++ b/scripts/kconfig/mconf.c
 @@ -35,9 +35,13 @@ static const char mconf_readme[] = N_(
  kernel parameters which are not really features, but must be\n
  entered in as decimal or hexadecimal numbers or possibly text.\n
  \n
 -Menu items beginning with [*], M or [ ] represent features\n
 -configured to be built in, modularized or removed respectively.\n
 -Pointed brackets  represent module capable features.\n
 +Menu items beginning with following braces represent features that\n
 +  [ ] can be built in or removed\n
 +can be built in, modularized or removed\n
 +  { } can be built in or modularized (selected by other feature)\n
 +  - - are selected by other feature,\n
 +while *, M or whitespace inside braces means to build in, build as\n
 +a module or to exclude the feature respectively.\n
  \n
  To change any of these features, highlight it with the cursor\n
  keys and press Y to build it in, M to make it a module or\n
 @@ -178,9 +182,9 @@ menu_instructions[] = N_(
   Arrow keys navigate the menu.  
   Enter selects submenus ---.  
   Highlighted letters are hotkeys.  
 - Pressing Y includes, N excludes, M modularizes features.  
 + Pressing Y includes (*), M modularizes (M), N excludes features 
 ( ).  
   Press EscEsc to exit, ? for Help, / for Search.  
 - Legend: [*] built-in  [ ] excluded  M modulemodule capable),
 + Legend: [*] built-in,   module capable, { } implied, -*- forced.),
  radiolist_instructions[] = N_(
   Use the arrow keys to navigate this window or 
   press the hotkey of the item you wish to select 
 @@ -560,7 +564,7 @@ static void build_conf(struct menu *menu)
   if (sym_is_changable(sym))
   item_make([%c], val == no ? ' ' : 
 '*');
   else
 - item_make(---);
 + item_make(-%c-, val == no ? ' ' : 
 '*');
   item_set_tag('t');
   item_set_data(menu);
   break;
 @@ -571,9 +575,10 @@ static void build_conf(struct menu *menu)
   default:  ch = ' '; break;
   }
   if (sym_is_changable(sym))
 - item_make(%c, ch);
 + item_make((sym_get_minimal_value(sym) 
 == mod) ?
 +   {%c} : %c, ch);
   else
 -