* [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE
@ 2013-10-02 5:24 Martin Walch
2013-10-02 5:37 ` David Rientjes
0 siblings, 1 reply; 5+ messages in thread
From: Martin Walch @ 2013-10-02 5:24 UTC (permalink / raw
Cc: Michal Marek, Jiri Kosina, Yann E. MORIN,
Arve Hjønnevåg, Benjamin Poirier, Dirk Gouders,
Wang YanQing, Andrew Morton, Jean Delvare, Kees Cook, Alan Cox,
linux-kbuild, linux-kernel
From: Martin Walch <walch.martin@web.de>
Date: Wed, 2 Oct 2013 06:54:27 +0200
Subject: [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE
replace the question mark in the comment after SYMBOL_WRITE with an explanation
Signed-off-by: Martin Walch <walch.martin@web.de>
---
scripts/kconfig/expr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index df198a5..ba663e1 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -93,7 +93,7 @@ struct symbol {
#define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */
#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */
#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */
-#define SYMBOL_WRITE 0x0200 /* ? */
+#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
#define SYMBOL_CHANGED 0x0400 /* ? */
#define SYMBOL_AUTO 0x1000 /* value from environment variable */
#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */
--
1.8.1.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE
2013-10-02 5:24 [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE Martin Walch
@ 2013-10-02 5:37 ` David Rientjes
2013-10-02 23:39 ` Martin Walch
0 siblings, 1 reply; 5+ messages in thread
From: David Rientjes @ 2013-10-02 5:37 UTC (permalink / raw
To: Martin Walch
Cc: Michal Marek, Jiri Kosina, Yann E. MORIN,
Arve Hjønnevåg, Benjamin Poirier, Dirk Gouders,
Wang YanQing, Andrew Morton, Jean Delvare, Kees Cook, Alan Cox,
linux-kbuild, linux-kernel
On Wed, 2 Oct 2013, Martin Walch wrote:
> diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
> index df198a5..ba663e1 100644
> --- a/scripts/kconfig/expr.h
> +++ b/scripts/kconfig/expr.h
> @@ -93,7 +93,7 @@ struct symbol {
> #define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */
> #define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */
> #define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */
> -#define SYMBOL_WRITE 0x0200 /* ? */
> +#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
> #define SYMBOL_CHANGED 0x0400 /* ? */
> #define SYMBOL_AUTO 0x1000 /* value from environment variable */
> #define SYMBOL_CHECKED 0x2000 /* used during dependency checking */
Perhaps stating that the choice is writable by the user?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE
2013-10-02 5:37 ` David Rientjes
@ 2013-10-02 23:39 ` Martin Walch
2013-10-02 23:42 ` David Rientjes
0 siblings, 1 reply; 5+ messages in thread
From: Martin Walch @ 2013-10-02 23:39 UTC (permalink / raw
To: David Rientjes, linux-kbuild
Cc: Michal Marek, Jiri Kosina, Yann E. MORIN,
Arve Hjønnevåg, Benjamin Poirier, Dirk Gouders,
Wang YanQing, Andrew Morton, Jean Delvare, Kees Cook,
linux-kernel
> > diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
> > index df198a5..ba663e1 100644
> > --- a/scripts/kconfig/expr.h
> > +++ b/scripts/kconfig/expr.h
> > @@ -93,7 +93,7 @@ struct symbol {
> > #define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */
> > #define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */
> > #define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */
> > -#define SYMBOL_WRITE 0x0200 /* ? */
> > +#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
> > #define SYMBOL_CHANGED 0x0400 /* ? */
> > #define SYMBOL_AUTO 0x1000 /* value from environment variable */
> > #define SYMBOL_CHECKED 0x2000 /* used during dependency checking */
>
> Perhaps stating that the choice is writable by the user?
As far as I understand SYMBOL_WRITE, its main purpose is in the function
conf_write in confdata.c:
>if (!(sym->flags & SYMBOL_WRITE))
> goto next;
>sym->flags &= ~SYMBOL_WRITE;
>
>conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
So, if I have not missed anything, SYMBOL_WRITE decides whether to write a symbol
to .config or not. This does not necessarily mean that the user can change the value.
SYMBOL_WRITE may be set and the symbol may be written to .config while the user
does not even see the corresponding prompt.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE
2013-10-02 23:39 ` Martin Walch
@ 2013-10-02 23:42 ` David Rientjes
2013-10-03 0:26 ` Martin Walch
0 siblings, 1 reply; 5+ messages in thread
From: David Rientjes @ 2013-10-02 23:42 UTC (permalink / raw
To: Martin Walch
Cc: linux-kbuild, Michal Marek, Jiri Kosina, Yann E. MORIN,
Arve Hjønnevåg, Benjamin Poirier, Dirk Gouders,
Wang YanQing, Andrew Morton, Jean Delvare, Kees Cook,
linux-kernel
On Thu, 3 Oct 2013, Martin Walch wrote:
> So, if I have not missed anything, SYMBOL_WRITE decides whether to write a symbol
> to .config or not. This does not necessarily mean that the user can change the value.
> SYMBOL_WRITE may be set and the symbol may be written to .config while the user
> does not even see the corresponding prompt.
>
The purpose of SYMBOL_WRITE is in sym_calc_value() where it is set if the
config symbol is visible and settable by the user, which is why I
suggested it be specified as being writable by the user.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE
2013-10-02 23:42 ` David Rientjes
@ 2013-10-03 0:26 ` Martin Walch
0 siblings, 0 replies; 5+ messages in thread
From: Martin Walch @ 2013-10-03 0:26 UTC (permalink / raw
To: David Rientjes
Cc: linux-kbuild, Michal Marek, Jiri Kosina, Yann E. MORIN,
Arve Hjønnevåg, Benjamin Poirier, Dirk Gouders,
Wang YanQing, Andrew Morton, Jean Delvare, Kees Cook,
linux-kernel
On Wednesday 02 October 2013 16:42:27 David Rientjes wrote:
> The purpose of SYMBOL_WRITE is in sym_calc_value() where it is set if the
> config symbol is visible and settable by the user, which is why I
> suggested it be specified as being writable by the user.
Then this looks strange to me: a config symbol of type boolean or tristate
that is not visible, but has a default value != n will have SYMBOL_WRITE set
in sym_calc_value:
> case S_BOOLEAN:
> case S_TRISTATE:
> if (sym_is_choice_value(sym) && sym->visible == yes) {
> ...
> } else {
> ...
> if (!sym_is_choice(sym)) {
> prop = sym_get_default_prop(sym);
> if (prop) {
> sym->flags |= SYMBOL_WRITE;
> newval.tri = EXPR_AND(expr_calc_value(prop->expr),
> prop->visible.tri);
> }
> }
> ...
> }
--
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-03 0:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 5:24 [PATCH 1/4] kconfig: add short explanation to SYMBOL_WRITE Martin Walch
2013-10-02 5:37 ` David Rientjes
2013-10-02 23:39 ` Martin Walch
2013-10-02 23:42 ` David Rientjes
2013-10-03 0:26 ` Martin Walch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).