diff options
author | Don Zickus <dzickus@redhat.com> | 2018-04-11 15:15:37 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-04-13 10:23:11 -0400 |
commit | 17baab68d337a0bf4654091e2b4cd67c3fdb44d8 (patch) | |
tree | cdcd1fc9e592e7cb75b3e563090c300b47c807e6 /scripts | |
parent | eea6f62bc2d67e42dd553181a68984268a03594f (diff) |
kconfig: extend output of 'listnewconfig'
We at Red Hat/Fedora have generally tried to have a per file breakdown of
every config option we set. This makes it easy for us to add new options
when they are exposed and keep a changelog of why they were set.
A Fedora example is here:
https://src.fedoraproject.org/cgit/rpms/kernel.git/tree/configs/fedora/generic
Using various merge scripts, we build up a config file and run it through
'make listnewconfig' and 'make oldnoconfig'. The idea is to print out new
config options that haven't been manually set and use the default until
a patch is posted to set it properly.
To speed things up, it would be nice to make it easier to generate a
patch to post the default setting. The output of 'make listnewconfig'
has two issues that limit us:
- it doesn't provide the default value
- it doesn't provide the new 'choice' options that get flagged in
'oldconfig'
This patch extends 'listnewconfig' to address the above two issues.
This allows us to run a script
make listnewconfig | rhconfig-tool -o patches; git send-email patches/
The output of 'make listnewconfig':
CONFIG_NET_EMATCH_IPT
CONFIG_IPVLAN
CONFIG_ICE
CONFIG_NET_VENDOR_NI
CONFIG_IEEE802154_MCR20A
CONFIG_IR_IMON_DECODER
CONFIG_IR_IMON_RAW
The new output of 'make listnewconfig':
CONFIG_KERNEL_XZ=n
CONFIG_KERNEL_LZO=n
CONFIG_NET_EMATCH_IPT=n
CONFIG_IPVLAN=n
CONFIG_ICE=n
CONFIG_NET_VENDOR_NI=y
CONFIG_IEEE802154_MCR20A=n
CONFIG_IR_IMON_DECODER=n
CONFIG_IR_IMON_RAW=n
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/conf.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 4e08121a35fb..283eeedaa4fa 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -422,8 +422,18 @@ static void check_conf(struct menu *menu) | |||
422 | if (sym_is_changable(sym) || | 422 | if (sym_is_changable(sym) || |
423 | (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { | 423 | (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { |
424 | if (input_mode == listnewconfig) { | 424 | if (input_mode == listnewconfig) { |
425 | if (sym->name && !sym_is_choice_value(sym)) { | 425 | if (sym->name) { |
426 | printf("%s%s\n", CONFIG_, sym->name); | 426 | const char *str; |
427 | |||
428 | if (sym->type == S_STRING) { | ||
429 | str = sym_get_string_value(sym); | ||
430 | str = sym_escape_string_value(str); | ||
431 | printf("%s%s=%s\n", CONFIG_, sym->name, str); | ||
432 | free((void *)str); | ||
433 | } else { | ||
434 | str = sym_get_string_value(sym); | ||
435 | printf("%s%s=%s\n", CONFIG_, sym->name, str); | ||
436 | } | ||
427 | } | 437 | } |
428 | } else { | 438 | } else { |
429 | if (!conf_cnt++) | 439 | if (!conf_cnt++) |