Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 309667e5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull kconfig changes from Michal Marek:
 "I forgot to send a pull request in time for the v3.8-rc1 merge window,
  so the list is a bit longer this time:

   - menuconfig enables extended colors in ncurses if the wide-character
     version is used.

   - CONFIG_ prefix can be specified in the environment to make life
     easier for people using kconfig multiple times in a single tree (no
     functional change in the kernel kconfig usage).

   - kconfig aborts on OOM.

   - inputboxes in menuconfig allow to move the cursor.

   - menuconfig has Save/Load buttons now.

   - xconfig build fix with new g++ and Qt3.

   - nconfig color scheme fix and help text update.

   - make oldconfig prints newlines when output is redirected.

   - some other minor fixes."

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: Fix missing '\n' for NEW symbols in yes "" | make oldconfig >conf.new
  kconfig: nconf: rewrite labels of function keys line
  kconfig: nconf: rewrite help texts
  kconfig: fix a compiliation error when using make xconfig
  nconf: function keys line, change background color for better readability
  menuconfig: Get rid of the top-level entries for "Load an Alternate/Save an Alternate"
  menuconfig: Add Save/Load buttons
  kconfig:lxdialog: remove duplicate code
  menuconfig:inputbox: support navigate input position
  kconfig: document use of CONFIG_ environment variable
  scripts/kconfig: ensure we use proper CONFIG_ prefix
  merge_config.sh: Add option to specify output dir
  Revert "kconfig-language: add to hints"
  kconfig: Regenerate lexer
  kconfig: Fix malloc handling in conf tools
  kconfig: get CONFIG_ prefix from the environment
  kconfig: add a function to get the CONFIG_ prefix
  kconfig: remove CONFIG_ from string constants
  menuconfig: fix extended colors ncurses support
parents ad60a933 e3900e74
Loading
Loading
Loading
Loading
+0 −23
Original line number Original line Diff line number Diff line
@@ -388,26 +388,3 @@ config FOO
	depends on BAR && m
	depends on BAR && m


limits FOO to module (=m) or disabled (=n).
limits FOO to module (=m) or disabled (=n).

Kconfig symbol existence
~~~~~~~~~~~~~~~~~~~~~~~~
The following two methods produce the same kconfig symbol dependencies
but differ greatly in kconfig symbol existence (production) in the
generated config file.

case 1:

config FOO
	tristate "about foo"
	depends on BAR

vs. case 2:

if BAR
config FOO
	tristate "about foo"
endif

In case 1, the symbol FOO will always exist in the config file (given
no other dependencies).  In case 2, the symbol FOO will only exist in
the config file if BAR is enabled.
+6 −0
Original line number Original line Diff line number Diff line
@@ -46,6 +46,12 @@ KCONFIG_OVERWRITECONFIG
If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
break symlinks when .config is a symlink to somewhere else.
break symlinks when .config is a symlink to somewhere else.


CONFIG_
--------------------------------------------------
If you set CONFIG_ in the environment, Kconfig will prefix all symbols
with its value when saving the configuration, instead of using the default,
"CONFIG_".

______________________________________________________________________
______________________________________________________________________
Environment variables for '{allyes/allmod/allno/rand}config'
Environment variables for '{allyes/allmod/allno/rand}config'


+3 −0
Original line number Original line Diff line number Diff line
@@ -11,6 +11,9 @@ else
Kconfig := Kconfig
Kconfig := Kconfig
endif
endif


# We need this, in case the user has it in its environment
unexport CONFIG_

xconfig: $(obj)/qconf
xconfig: $(obj)/qconf
	$< $(Kconfig)
	$< $(Kconfig)


+6 −1
Original line number Original line Diff line number Diff line
@@ -36,6 +36,7 @@ enum input_mode {
} input_mode = oldaskconfig;
} input_mode = oldaskconfig;


static int indent = 1;
static int indent = 1;
static int tty_stdio;
static int valid_stdin = 1;
static int valid_stdin = 1;
static int sync_kconfig;
static int sync_kconfig;
static int conf_cnt;
static int conf_cnt;
@@ -108,6 +109,8 @@ static int conf_askvalue(struct symbol *sym, const char *def)
	case oldaskconfig:
	case oldaskconfig:
		fflush(stdout);
		fflush(stdout);
		xfgets(line, 128, stdin);
		xfgets(line, 128, stdin);
		if (!tty_stdio)
			printf("\n");
		return 1;
		return 1;
	default:
	default:
		break;
		break;
@@ -495,6 +498,8 @@ int main(int ac, char **av)
	bindtextdomain(PACKAGE, LOCALEDIR);
	bindtextdomain(PACKAGE, LOCALEDIR);
	textdomain(PACKAGE);
	textdomain(PACKAGE);


	tty_stdio = isatty(0) && isatty(1) && isatty(2);

	while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) {
	while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) {
		input_mode = (enum input_mode)opt;
		input_mode = (enum input_mode)opt;
		switch (opt) {
		switch (opt) {
@@ -621,7 +626,7 @@ int main(int ac, char **av)
				return 1;
				return 1;
			}
			}
		}
		}
		valid_stdin = isatty(0) && isatty(1) && isatty(2);
		valid_stdin = tty_stdio;
	}
	}


	switch (input_mode) {
	switch (input_mode) {
+5 −5
Original line number Original line Diff line number Diff line
@@ -13,7 +13,7 @@


struct expr *expr_alloc_symbol(struct symbol *sym)
struct expr *expr_alloc_symbol(struct symbol *sym)
{
{
	struct expr *e = calloc(1, sizeof(*e));
	struct expr *e = xcalloc(1, sizeof(*e));
	e->type = E_SYMBOL;
	e->type = E_SYMBOL;
	e->left.sym = sym;
	e->left.sym = sym;
	return e;
	return e;
@@ -21,7 +21,7 @@ struct expr *expr_alloc_symbol(struct symbol *sym)


struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
{
{
	struct expr *e = calloc(1, sizeof(*e));
	struct expr *e = xcalloc(1, sizeof(*e));
	e->type = type;
	e->type = type;
	e->left.expr = ce;
	e->left.expr = ce;
	return e;
	return e;
@@ -29,7 +29,7 @@ struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)


struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
{
{
	struct expr *e = calloc(1, sizeof(*e));
	struct expr *e = xcalloc(1, sizeof(*e));
	e->type = type;
	e->type = type;
	e->left.expr = e1;
	e->left.expr = e1;
	e->right.expr = e2;
	e->right.expr = e2;
@@ -38,7 +38,7 @@ struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e


struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
{
{
	struct expr *e = calloc(1, sizeof(*e));
	struct expr *e = xcalloc(1, sizeof(*e));
	e->type = type;
	e->type = type;
	e->left.sym = s1;
	e->left.sym = s1;
	e->right.sym = s2;
	e->right.sym = s2;
@@ -66,7 +66,7 @@ struct expr *expr_copy(const struct expr *org)
	if (!org)
	if (!org)
		return NULL;
		return NULL;


	e = malloc(sizeof(*org));
	e = xmalloc(sizeof(*org));
	memcpy(e, org, sizeof(*org));
	memcpy(e, org, sizeof(*org));
	switch (org->type) {
	switch (org->type) {
	case E_SYMBOL:
	case E_SYMBOL:
Loading