Re: [PATCHv2] Kbuild: kconfig: Verbose version of --listnewconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

[This message is a bit out-of-scope of this patch]

On Sat, Dec 4, 2010 at 12:10 PM, Ben Hutchings <ben@xxxxxxxxxxxxxxx> wrote:
> diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
> index 184eb6a..b267933 100644
> --- a/scripts/kconfig/expr.h
> +++ b/scripts/kconfig/expr.h
> @@ -108,6 +108,8 @@ struct symbol {
>  #define SYMBOL_DEF3       0x40000  /* symbol.def[S_DEF_3] is valid */
>  #define SYMBOL_DEF4       0x80000  /* symbol.def[S_DEF_4] is valid */
>
> +#define SYMBOL_NEW        0x100000 /* symbol is new (loaded config did not provide a value) */
> +
>  #define SYMBOL_MAXLENGTH       256
>  #define SYMBOL_HASHSIZE                9973
>
Just for the record, as long as I like this explicit flag, it does
only make sense for the S_DEF_USER case.

Kconfig seems to have been thought originally to support multiple
state of the tree (through the S_DEF_* flags). However, there has been
years after years more and more code written solely for the S_DEF_USER
case. Nowadays, making useful use of these S_DEF_* flags has became
pretty much impossible.

If the goal of this patch was just to provide a verbose
--listnewconfig, that should have been doable within check_conf().

Just a side note, using conf_write symbol() has the disadvantage to print:

# CONFIG_FOO is not set

instead of

CONFIG_FOO=n

or

CONFIG_FOO is not set

I've never been a big fan of having the format included in a generic
library. I guess the caller should specify a printer callback. That
would avoid also the `headerfile' fuss of conf_write_string.

I'd suggest the printer callback to be of the form:

struct conf_printer_callback {
    void (*print_set)(struct symbol *);
    void (*print_unset)(struct symbol *);
    void (*print_comment)(struct symbol *);
}

that way, conf_write() and conf_write_autoconf() would also share more code...

 - Arnaud, who had other plan for the day :/
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux