Commit Graph

220 Commits

Author SHA1 Message Date
Roman Zippel dc7862e5a6 kconfig: set all new symbols automatically
Add conf_set_all_new_symbols() which set all symbols (which don't have a
value yet) to a specifed value.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:48 +02:00
Christophe Jaillet 107f43a0f7 kconfig: incorrect 'len' field initialisation ?
1) The field 'len' of the 'gstr' structure seems to track the size of the memory
already allocated for the "growable string". So the value of this field should be
the same as the 'malloc()' just above, shouldn't it ?

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-19 20:14:49 +02:00
Sam Ravnborg c4143a8303 kconfig: fix MAC OS X warnings in menuconfig
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Timur Tabi <timur@freescale.com>
2008-05-04 21:03:20 +02:00
Sam Ravnborg b44158de9e kconfig: made check-lxdialog more portable
OS-X shell did not like 'echo -e' so implement
suggestion from Al Viro to use a more portable construct.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-By: Timur Tabi <timur@freescale.com>
2008-05-01 19:29:47 +02:00
Roman Zippel 5a1aa8a1af kconfig: add named choice group
As choice dependency are now fully checked, it's quite easy to add support
for named choices. This lifts the restriction that a choice value can only
appear once, although it still has to be within the same group,
but multiple choices can be joined by giving them a name.
While at it I cleaned up a little the choice type logic to simplify it a
bit.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 23:05:48 +02:00
Roman Zippel 4898117886 kconfig: fix choice dependency check
Properly check the dependency of choices as a group.
Also fix that sym_check_deps() correctly terminates the dependency loop
error check (otherwise it would continue printing the dependency chain).

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 23:04:57 +02:00
Roel Kluin 79d6e539df kconfig: reversed borderlines in inputbox
Fix reversal of dlg.border.atr and dlg.dialog.atr for draw_box()
Makes the inputbox look like expected

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 22:27:26 +02:00
Sam Ravnborg 4217516e52 kconfig: fix broken target update-po-config
Massimo Maiurana reported:
In the latest kernel "make update-po-config" fails because it tries
to open arch/Kconfig/Kconfig, since the ls command doesn't
distinguish between files and directories.

Cc: Massimo Maiurana <maiurana@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 21:15:41 +02:00
Roman Zippel 587c90616a kconfig: fix select in combination with default
> The attached .config (with current -git) results in a compile
> error since it contains:
>
> CONFIG_X86=y
> # CONFIG_EMBEDDED is not set
> CONFIG_SERIO=m
> CONFIG_SERIO_I8042=y
>
> Looking at drivers/input/serio/Kconfig I simply don't get how this
> can happen.

You've hit the rather subtle rules of select vs default. What happened is
that SERIO is selected to m, but SERIO_I8042 isn't selected so the default
of y is used instead.
We already had the problem in the past that select and default don't work
well together, so this patch cleans this up and makes the rule hopefully
more straightforward. Basically now the value is calculated like this:

	(value && dependency) || select

where the value is the user choice (if available and the symbol is
visible) or default.

In this case it means SERIO and SERIO_I8042 are both set to y due to their
default and if SERIO didn't had the default, then the SERIO_I8042 value
would be limited to m due to the dependency.

I tested this patch with more 10000 random configs and above case is the
only the difference that showed up, so I hope there is nothing that
depended on the old more complex and subtle rules.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Tested-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-13 22:30:09 +01:00
Sam Ravnborg 603d49885e kconfig: ignore select of unknown symbol
We have had warnings for a long time about select of unknow symbol
but the warnings does not really makes sense since we may
select a symbol that is relevant and defined in one
arch but not in another arch.
And as long as we do not use a common set of Kconfig files
for all archs lets just ignore this case.

Previously we have used this to find bad uses of
select but we need a more relaible method to do so.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-02-03 08:58:07 +01:00
Sam Ravnborg 36ef805bd5 kconfig: mark config as changed when loading an alternate config
Michal Zachar <mgzachar@mail.t-com.sk> reported that
menuconfig did not save the new config when loading
an alternate config unless he altered it manually.

Mark config as changed upon load of alternate config fixed this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Roman Zippel <zippel@linux-m68k.org>
2008-02-03 08:58:07 +01:00
Jan Beulich f5eaa323eb kconfig: tristate choices with mixed tristate and boolean values
Change kconfig behavior so that mixing bool and tristate config
settings in a choice is possible and has the desired effect of offering
just the tristate options individually if the choice gets set to M, and
a normal boolean selection if the choice gets set to Y.

Also fix scripts/kconfig/conf's handling of children of choice values -
there may be more than one immediate child, and all of them need to be
processed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: "Roman Zippel" <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Adrian Bunk 9649ef878d kconfig: remove "enable"
Kconfig had a synonym "enable" for "select" that was neither documented
nor used.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Roman Zippel 80daa56008 kconfig: use environment option
Use the environment option to provide the ARCH symbol
and the KERNELVERSION symbol.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:39 +01:00
Roman Zippel 93449082e9 kconfig: environment symbol support
Add the possibility to import a value from the environment into kconfig
via the option syntax. Beside flexibility this has the advantage
providing proper dependencies.
Documented the options syntax.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:39 +01:00
Roman Zippel 7a96292335 kconfig: explicitly introduce expression list
Rename E_CHOICE to E_LIST to explicitly add support for expression
lists. Add a helper macro expr_list_for_each_sym to more easily iterate
over the list.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 0ffce8d944 kconfig: gconfig: symbol fix
Gettext support for symbol names are unnecessary.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 534a450c38 kconfig: gettext support for config
Gettext support for conf.c

[Include locale.h by Kyle].

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
2008-01-28 23:14:39 +01:00
EGRY Gabor 75c0a8a55c kconfig: gettext support for lxdialog
Gettext support for lxdialog.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 413f006bab kconfig: gettext support for menuconfig
Full gettext support for menuconfig.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor c21a2d9589 kconfig: gettext support for xconfig
Full gettext support for xconfig.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 01771b0fef kconfig: macro fix in menu.c
This patch removes the indirect I18N support for config file.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 46d2631978 kconfig: gettext support for gconfig
Gettext support for menu and toolbar.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor bb7ef3905a kconfig: missing macros in gconfig
This patch adds missing gettext macros.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
EGRY Gabor f7a4b4cdc2 kconfig: whitespace removing
This patch removes the unnecessary whitespaces from
end of help lines of Kconfig files.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
EGRY Gabor 1020026f99 kconfig: update-po-config info
This patch adds tracking messages.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Ladislav Michl 07f7668858 kconfig: use C89 random functions in conf.c
rand and srand functions conform also to C89 in addition to POSIX.1-2001,
which makes them a bit more portable (work also on MinGW host). Linux man
page also says:
"The versions of rand() and srand() in the Linux C Library use the same
random number generator as random() and srandom()".

* Use C89 conformant functions rand() and srand()

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Ladislav Michl 75ff4309cd kconfig: fix whitespace and sort includes in conf.c
Sort includes and remove leading whitespace.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org
2008-01-28 23:14:38 +01:00
Sam Ravnborg de83cf148a kconfig: delete unused FILE_ and SYMBOL_ flags
The *_PRINTED flags were never used - so delete them.
Do we need them later then we can re-add them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Sam Ravnborg d6ee35764f kconfig: rename E_OR & friends to avoid name clash
We had macros named the same as a set of enumeration values.
It is legal code but very confusing to read - so rename
the macros from E_* to EXPR_*

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Jan Engelhardt d84876f9f8 kconfig: allow overriding symbols
Allow config variables in .config to override earlier ones in the same
file. In other words,

	# CONFIG_SECURITY is not defined
	CONFIG_SECURITY=y

will activate it. This makes it a bit easier to do

cat original-config myconfig myconfig2 ... >.config;
and run *config as expected.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
2008-01-28 23:14:37 +01:00
Ladislav Michl 09af091f50 kconfig: make kconfig MinGW friendly
Kconfig is powerfull tool. So powerfull that more and more software
projects are using it for configuration. So instead of fixing some of
them one by one, lets fix it in kernel and wait for sync.

This work was originaly done for PTXdist - GPL licensed build system for
userlands and cross-compilers, but it will not hurt kernel kconfig
either. PTXdist menuconfig now works on Windows linked with PDCurses and
compiled using MinGW - there is no termios and signals.

* Do not include <sys/wait.h> and <signal.h> (comes from times when
  lxdialog was separate process)
* Do not mess with termios directly and let curses tell screen size.
  Comment to commit c8dc68ad0f says
  check for screen size could be removed later, but because it didn't
  happen for more than year I left it here as well.
* Save cursor position added by Sam

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:37 +01:00
Andres Salomon 2f4b489b77 kconfig: use getopt() in conf.c for handling command line arguments
Switch from doing our own parsing of command line arguments to
using getopt(3) to do it.  Aside from simplifying things, this allows us to
specify multiple arguments; the old code could only accept two arguments
(input_mode and kconfig name).

Note some subtle changes:
 - The argument '-?' is no longer supported.
 - '-h' is not treated as an error, so output goes to stdout, and we
   exit with '0'.
 - There is no compatibility checking amongst arguments; the last option
   will simply override earlier options.  For example, 'conf -n -y foo'
   is perfectly valid now (input_mode will be set_yes).  Previously, that
   would have been an error ("can't find file -y").

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:36 +01:00
Sam Ravnborg 6e588f6dcf kconfig: if ncurses-devel is missing then say so
With this patch when ncurses-devel (or whatever it is named)
is missing trying to run menuconfig will result in this:

$ make menuconfig
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 ***
 *** Install ncurses (ncurses-devel) and try again.
 ***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2

Much better than before where we just listed some build errors.
The other *config targets will work indepenednt on ncurses
being present or not.

Includes improvements suggested by: Frans Pop <elendil@planet.nl>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Frans Pop <elendil@planet.nl>
2008-01-28 23:14:36 +01:00
Paul Mundt 870e6f7e15 kconfig: obey KCONFIG_ALLCONFIG choices with randconfig.
Currently when using KCONFIG_ALLCONFIG with randconfig the choice options
are clobbered.  As recommended by Roman, this adds an is_new test to see
whether to select a new option or obey the existing one.

This is a resend of the earlier patch a couple of weeks ago, since there
was no reply.  Original thread is at http://lkml.org/lkml/2007/11/28/94

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-12-23 12:54:37 -08:00
Sam Ravnborg 6840999b19 x86: simplify "make ARCH=x86" and fix kconfig all.config
Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in
all.config.

For a fix the diffstat is nice:
 6 files changed, 3 insertions(+), 36 deletions(-)

The patch reverts these commits:
 - 0f855aa64b ("kconfig: add helper to set
   config symbol from environment variable")
 - 2a113281f5 ("kconfig: use $K64BIT to
   set 64BIT with all*config targets")

Roman Zippel pointed out that kconfig supported string compares so
the additional complexity introduced by the above two patches were
not needed.

With this patch we have following behaviour:

  # make {allno,allyes,allmod,rand}config [ARCH=...]
  option \ host arch      | 32bit         | 64bit
  =====================================================
  ./.                     | 32bit         | 64bit
  ARCH=x86                | 32bit         | 32bit
  ARCH=i386               | 32bit         | 32bit
  ARCH=x86_64             | 64bit         | 64bit

The general rule are that ARCH= and native architecture takes
precedence over the configuration.

So make ARCH=i386 [whatever] will always build a 32-bit kernel
no matter what the configuration says.  The configuration will
be updated to 32-bit if it was configured to 64-bit and the
other way around.

This behaviour is consistent with previous behaviour so no
suprises here.

make ARCH=x86 will per default result in a 32-bit kernel but as
the only ARCH= value x86 allow the user to select between 32-bit
and 64-bit using menuconfig.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andreas Herrmann <aherrman@arcor.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-17 08:35:43 -08:00
Sam Ravnborg daa93fab82 x86: enable "make ARCH=x86"
After unification of the Kconfig files and
introducing K64BIT support in kconfig
it required only trivial changes to enable
"make ARCH=x86".

With this patch you can build for x86_64 in several ways:
1) make ARCH=x86_64
2) make ARCH=x86 K64BIT=y
3) make ARCH=x86 menuconfig
   => select 64-bit

Likewise for i386 with the addition that
i386 is default is you say ARCH=x86.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
2007-11-12 21:02:20 +01:00
Sam Ravnborg 2a113281f5 kconfig: use $K64BIT to set 64BIT with all*config targets
The variable K64BIT can now be used to select the
value of CONFIG_64BIT.

This is for example useful for powerpc to generate
allmodconfig for both bit sizes - like this:
make ARCH=powerpc K64BIT=y
make ARCH=powerpc K64BIT=n

To use this the Kconfig file must use "64BIT" as the
config value to select between 32 and 64 bit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-11-12 21:02:20 +01:00
Sam Ravnborg 0f855aa64b kconfig: add helper to set config symbol from environment variable
Add conf_set_env_sym() that can set an already defined symbol
based on the value of an environment variable.

Unknown symbols are silently ignored.
A warning is printed if the value of the environment variable
is unexpected.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-11-12 21:02:20 +01:00
Sam Ravnborg 9c900a9c9d kconfig: factor out code in confdata.c
This patch introduce no functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-11-12 21:02:19 +01:00
Sam Ravnborg 47572387d5 x86: move i386 and x86_64 Kconfig files to x86 directory
After a small change in kconfig Makefile we could
move all x86 Kconfig files to x86 directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:37:02 +02:00
Sam Ravnborg e703f75d62 kconfig: small code refactoring in kconfig Makefile
Do not hardcode the arch/$(ARCH)/Kconfig name all over

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:35:18 +02:00
Sam Ravnborg 2266cfd50d x86: move defconfig files for i386 and x86_64 to x86
With some small changes to kconfig makefile we can now
locate the defconfig files for i386 and x86_64 in
the configs/ subdirectory under x86.
make ARCH=i386 defconfig and make defconfig
works as expected also after this change.
But arch maintainers shall now update a defconfig file in
the configs/ directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:27:41 +02:00
Randy Dunlap a54bb701c2 kconfig: set title bar in xconfig
Put kernel version info on title bar in xconfig (qconf) instead of
defaulting to "qconf".

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-20 20:16:50 +02:00
Linus Torvalds e8b8c97773 Revert "kconfig: tristate choices with mixed tristate and boolean values"
This reverts commit a5bf3d891a.

David Brownell notes that this causes a regression visible in the
drivers/usb/gadget Kconfig file:

  "That Kconfig hasn't changed (other than adding new drivers), and it's
   worked that way for several years now ...  so the issue seems to be
   changes in menuconfig/kconfig/etc semantics.

   The issue is that when USB_GADGET=m, it's no longer possible to
   configure peripheral controller drivers as modules ...  the
   controller drivers can now only be configured for static linkage.

   It should be making a choice of one of the controller drivers which
   could work on the target system, and allow that driver to be linked
   either as a module (ok iff USB_GADGET=m) or statically."

Reverting this commit resolves the problem, and also fixes a second
problem that David noticed: various dependent options couldn't be enabled.

Tested-and-reported-by: David Brownell <david-b@pacbell.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Jan Beulich <jbeulich@novell.com>,
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cc: Sam Ravnborg <sam@ravnborg.org>,
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 21:25:45 -07:00
Rob Landley e9e40e143c kconfig: comment typo in scripts/kconfig/Makefile.
Typo in comment in scripts/kconfig/Makefile.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 14:31:50 +02:00
Matej Laitl b5d609dbfa kconfig/menuconfig: distinguish between selected-by-another options and comments
menuconfig currently represents options implied by another option ('select'
directive in Kconfig) by prefixing them with '---'.  Unfortunately the same
notation is used for comments.  If the implied option is module capable,
user can still switch between Y and M, all without any feedback until she
visits option's help.  (try saying M to MAC80211 and then toggling
CFG80211)

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: Matej Laitl <strohel@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:33 +02:00
Jan Beulich a5bf3d891a kconfig: tristate choices with mixed tristate and boolean values
Change kconfig behavior so that mixing bool and tristate config settings in
a choice is possible and has the desired effect of offering just the
tristate options individually if the choice gets set to M, and a normal
boolean selection if the choice gets set to Y.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:33 +02:00
Sam Ravnborg 14f31562db kbuild: update _shipped files for kconfig syntax cleanup
Update _shipped files so regular user does not
need to have bison/flex/gperf installed.
Code changes were contained in previous commit.

Used following program versions (on fedora):
bison (GNU Bison) 2.3
flex 2.5.33
GNU gperf 3.0.2

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Adrian Bunk 247537b9a2 kconfig: syntax cleanup - drop support for "depends/requires/def_boolean"
Remove the following redundant and never or rarely used kconfig syntax:

- "def_boolean" (same as "def_bool")
- "requires" (same as "depends on")
- "depends" (same as "depends on")

This patch contains the code changes and Kconfig updates.
The shipped files are in next patch to let actual codechange stand out.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Sam Ravnborg a67cb1319f kconfig: fix segv fault in menuconfig
With specific configurations requesting help for certain
menu lines caused menuconfig to crash.
This was tracked down to a null pointer bug.
Thanks to "Miles Lane" <miles.lane@gmail.com> for inital reporting
and to Gabriel C <nix.or.die@googlemail.com> for the backtrace
that helped me locating the bug.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:32 +02:00
Sam Ravnborg 48874077dd kconfig: make comments stand out in menuconfig
Matěj Laitl <strohel@gmail.com> noticed that there was no way
to distingush between comments and un-selectable menu lines.
This patch marks comments with *** comment ***

Cc: Matěj Laitl <strohel@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:32 +02:00
Sam Ravnborg aa1e5ef5c1 kbuild: check if we can link gettext not just compile
cygwin provides the header file but the lib file needs
to be added manually. A generic fix is to check if
we can compile and link a program that uses gettext()
and if it fails fall back to NO_NLS.

International users of cygwin may have to specify
HOST_LOADLIBES := "-lintl" on the make command line.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Roman Zippel f82f3f9422 kconfig: oldconfig shall not set symbols if it does not need to
Avoid setting the value if the symbol doesn't need to be changed or can't
be changed. Later choices may change the dependencies and thus the
possible input range.

make oldconfig from a 2.6.22 .config with CONFIG_HOTPLUG_CPU not set
was in some configurations setting CONFIG_HOTPLUG_CPU=y without asking,
even when there was no actual requirement for CONFIG_HOTPLUG_CPU.
This was triggered by SUSPEND_SMP that does a select HOTPLUG_CPU.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Tested-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-09-01 08:24:09 +02:00
Sam Ravnborg 1edf1c00ac kconfig: remove unused members from struct symbol
dep and dep2 in struct symbol was unused - remove them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-07-25 21:14:30 +02:00
Sam Ravnborg 03d2912273 kconfig: attach help text to menus
Roman Zippel wrote:
> A simple example would be
> help texts, right now they are per symbol, but they should really be per
> menu, so archs can provide different help texts for something.

This patch does this and at the same time introduce a few API
funtions used to access the help text.

The relevant api functions are introduced in the various frontends.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-07-25 21:14:26 +02:00
Roman Zippel d8982ba1f2 kconfig: reset generated values only if Kconfig and .config agree.
Normally generated values (Kconfig entries without a prompt) are cleared as
they are regenerated anyway and so they appear as new should they become
visible and defaults work as expected (once a value is set defaults aren't
used anymore).

The detection whether a value is generated or not is only based on its
visibility status, which can quickly change for a lot of symbols by just
removing a single line from .config or adding a dependency to Kconfig as you
noticed.

The patch now suppresses this logic when .config and Kconfig aren't in sync
and .config needs to be updated, so that you can remove now a random value
from .config and oldconfig won't reask for many other values.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 14:24:55 +02:00
Bernhard Walle 0584f9f9cb kconfig: strip 'CONFIG_' automatically in kernel configuration search
Modify the ncurses configuration tool ('make menuconfig') in a way that the
user can enter the search string (/) both with or without the leading
'CONFIG_'.

This simplifies using copy & paste from .config files because you can
select the whole word.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 14:24:55 +02:00
Sam Ravnborg b70e325cfe kconfig: fix update-po-config
Massimo Maiurana <maiurana@gmail.com> reported that
update-po-config was broken:
1) spelling errors in Makefile so arch/um failed
2) UTF-8 was not supported

The following patch address the above problems.
kxgettext now append the output to the .pot file
generated by xgettext - so we have a header.
In all places UFT-8 is specifed so we now flawlessly
support UTF-8.
The Kconfig files had an empty string in a few cases -
these are now supressed in kxgettext.

With this the translators can now pick up where they left
and get it all translated.
There are ~11000 strings to be translated...

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Massimo Maiurana <maiurana@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-16 21:15:53 +02:00
Mike Frysinger e99c343f16 kconfig: use POSIX equality test in check-lxdialog.sh
The "==" operator is not in POSIX, so use -eq instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 21:15:51 +02:00
Mike Frysinger 03c9587d75 kconfig: search harder for curses library in check-lxdialog.sh
The check-lxdialog.sh script searches for "libFOO.so" which fails on OS X, due
to their special naming of libraries like "libfoo.dylib".  This patch turns
the curses lib search into extensible loops and adds dylib as a valid
extension.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:11:15 +02:00
Marcin Garski 11de39e2fb kconfig: fix mconf segmentation fault
I have found small bug in mconf, when you run it without any argument it
will sigsegv.

Without patch:
$ scripts/kconfig/mconf
Segmentation fault

With patch:
$ scripts/kconfig/mconf
can't find file (null)

Signed-off-by: Marcin Garski <mgarski@post.pl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-06 09:27:15 +02:00
Sam Ravnborg 5447d34b08 kconfig: error out if recursive dependencies are found
Sample:
config FOO
	bool "This is foo"
	depends on BAR

config BAR
	bool "This is bar"
	depends on FOO

This will result in following error message:
error: found recursive dependency: FOO -> BAR -> FOO

And will then exit with exit code equal 1 so make will stop.
Inspired by patch from: Adrian Bunk <bunk@stusta.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-05-06 09:20:10 +02:00
Robert P. J. Day 1e093ecd4a kconfig: correct minor typo in Kconfig warning message.
Correct a minor spelling mistake in a Kconfig warning message.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:12 +02:00
Randy Dunlap 7ac1c14525 kbuild: be more explicit on missing .config file
Somewhat in reponse to kernel bugzilla #8197, be more explicit about
why 'make all' fails when there is no .config file.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:11 +02:00
Sam Ravnborg 9ae57004ca kconfig: refer to qt3 if we cannot find qt libraries
We do not support qt4 (yet) so the simple fix was to warn
that qt3 are missing.
The better fix would have been to implment qt4 support
but that has failed so far.

This solves http://bugzilla.kernel.org/show_bug.cgi?id=8277

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Sam Ravnborg 145c90475f kbuild: remove kconfig binaries during make mrproper
Nigel Cunningham <nigel@nigel.suspend2.net> noticed
that 'make mrproper' did not remove mconf.
Fixed so we now remove all relevant binaries.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Nigel Cunningham <nigel@nigel.suspend2.net>
2007-05-02 20:58:10 +02:00
Sam Ravnborg d802b50f0d kconfig/menuconfig: do not hardcode '.config'
Export and use the function conf_get_configname()
to retreive the default configuration filename.

Suggested by: Roman Zippel <zippel@linux-m68k.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg 95e30f9593 menuconfig: remember alternate config filename
When loading an alternate configuration use that file as
current configuration filename.
Make the filename visible in the dialog.
Default continue to be .config.

Inspired by patch from: Cyrill Gorcunov <gorcunov@gmail.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Cyrill Gorcunov <gorcunov@gmail.com>
2007-05-02 20:58:09 +02:00
Marco Costalba 63431e7569 kconfig/xconfig: sync main view with search dialog current menu
When changing current menu in search dialog update also main view

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Mike Frysinger f88d205501 menuconfig: dont use obsolete index() function in lxdialog
The index() function is obsolete, use strchr() instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Cyrill V. Gorcunov ed8b4d4d7a [PATCH] qconf: hide empty list items
This patch fixes showing empty config list items if "Option/Show All
Options" is turned on.  For example empty items appears on list of 'Block
Layer' menu.

Signed-off-by: Cyrill V. Gorcunov <gorcunov@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Oleg Verych <olecom@flower.upol.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:52 -08:00
Cyrill V. Gorcunov f253f00003 [PATCH] qconf: Back button behaviour normalization
Do "Back" button behaviour normalization so it is enabled starting from
second-level menu only.

Signed-off-by: Cyrill V. Gorcunov <gorcunov@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:52 -08:00
Cyrill V. Gorcunov 786fb18d01 [PATCH] qconf: fix showing help info on failed search
qconf does not clear help text in search window if previous search has been
failed.

Signed-off-by: Cyrill V. Gorcunov <gorcunov@mail.ru>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:52 -08:00
Shlomi Fish 66e7c7230f [PATCH] qconf: relocate Search Command
Relocate the qconf search command to the "Edit"->"Find" menu option.

This is per the discussion on my qconf search dialog patch.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:51 -08:00
Karsten Wiese 49e5646d65 [PATCH] qconf: immediately update integer and string values in xconfig display
In xconfig's display integer and string values are also shown as part of
the config item's descriptive text.

This patch updates the descriptive text, when the corresponding value has
been changed.  Fix for http://bugzilla.kernel.org/show_bug.cgi?id=7744

Take2 uses updateList() so config values dependending on the changed value
see the change.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:51 -08:00
Roman Zippel 6fa1da8ea9 [PATCH] qconf: (re)fix SIGSEGV on empty menu items
Back out the recent fix for this bug, fix it by correctly initialising
ConfigInfoView.sym.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: "Cyrill V. Gorcunov" <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:20 -08:00
Cyrill V. Gorcunov 73b8ed29ab [PATCH] qconf: fix SIGSEGV on empty menu items
qconf may cause SIGSEGV by trying to show debug information on empty menu
items

Signed-off-by: Cyrill V. Gorcunov <gorcunov@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-05 23:55:29 -08:00
Karsten Wiese 0a0c502c94 [PATCH] kconfig: set gconf's save-widget's sensitivity according to .config's changed state
Clean up a little.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:48 -08:00
Karsten Wiese 3b354c557c [PATCH] kconfig: add "void conf_set_changed_callback(void (*fn)(void))", use it in qconf.cc
Added function sets "void (*conf_changed_callback)(void)".  Call it, if
.config's changed state changes.  Use above in qconf.cc to set gui's
save-widget's sensitvity.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:48 -08:00
Karsten Wiese bfc10001b1 [PATCH] kconfig: make sym_change_count static, let it be altered by 2 functions only
Those two functions are
	void sym_set_change_count(int count)
and
	void sym_add_change_count(int count)

All write accesses to sym_change_count are replaced by calls to above
functions.

Variable and changer-functions are moved to confdata.c.  IMO thats ok, as
sym_change_count is an attribute of the .config's change state.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:48 -08:00
Karsten Wiese b321429325 [PATCH] kconfig: new function "bool conf_get_changed(void)"
Run "make xconfig" on a freshly untarred kernel-tree.  Look at the floppy disk
icon of the qt application, that has just started: Its in a normal, active
state.

Mouse click on it: .config is being saved.

This patch series changes things so taht
after the mouse click on the floppy disk icon, the icon is greyed out.
If you mouse click on it now, nothing happens.

If you change some CONFIG_*, the floppy disk icon returns to "active state",
that is, if you mouse click it now, .config is written.

This patch:

Returns sym_change_count to reflect the .config's change state.
All read only accesses of
	sym_change_count
are replaced by calls to
	conf_get_changed()
.
mconfig.c is manipulated to ask for saving only when
conf_get_changed() returned true.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:48 -08:00
akpm@osdl.org 44ddc4f567 [PATCH] qconf: support old QT
Might make qconf compilable with qt-3.1 as well as qt-3.3

Cc: greg chesson <xtp@google.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:37 -08:00
Roman Zippel c154348f00 [PATCH] fix menuconfig colours with TERM=vt100
On Mon, 13 Nov 2006, Phil Oester wrote:
> In commit 350b5b7638, the default menuconfig
> color scheme was changed to bluetitle.  This breaks the highlighting
> of the selected item for me with TERM=vt100.  The only way I can see
> which item is selected is via:
>
>     make MENUCONFIG_COLOR=mono menuconfig
>
> Which restores the pre-2.6.19 white on black highlighting.

Fix.

Cc: Phil Oester <kernel@linuxace.com>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-25 13:28:34 -08:00
Roman Zippel f12aa70452 [PATCH] qconf: fix uninitialsied member
Fixes a segfault reported by Randy.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-25 13:28:34 -08:00
Franck Bui-Huu 5fd934a9a1 [PATCH] .gitignore: add miscellaneous files
Prevent git from reporting this useless status:

	On branch refs/heads/master
	Untracked files:
	  (use "git add" to add to commit)

	      TAGS
	      scripts/kconfig/lkc_defs.h
	      scripts/kconfig/qconf.moc
	nothing to commit

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-13 07:40:42 -08:00
Luca Tettamanti 1db11ea65e [PATCH] Fix menuconfig build failure due to missing stdbool.h
scripts/kconfig/lxdialog/util.c fails to build because it uses
true/false without including stdbool.h:

kronos:~/src/linux-2.6$ make O=../linux-build-git menuconfig
  GEN     /home/kronos/src/linux-build/Makefile
  HOSTCC  scripts/kconfig/lxdialog/util.o
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c: In function 'set_classic_theme':
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c:68: error: 'true' undeclared (first use in this function)
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c:68: error: (Each undeclared identifier is reported only once
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c:68: error: for each function it appears in.)
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c:70: error: 'false' undeclared (first use in this function)
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c: In function 'set_blackbg_theme':
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c:101: error: 'true' undeclared (first use in this function)
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c:102: error: 'false' undeclared (first use in this function)
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c: In function 'set_bluetitle_theme':
/home/kronos/src/linux-2.6/scripts/kconfig/lxdialog/util.c:144: error: 'true' undeclared (first use in this function)
make[2]: *** [scripts/kconfig/lxdialog/util.o] Error 1
make[1]: *** [menuconfig] Error 2
make: *** [menuconfig] Error 2

Add <stdbool.h> to dialog.h to fix the breakage.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:14:14 -07:00
Sam Ravnborg 9a3d0fe84f kconfig: fix saving alternate kconfig file in parent dir
This fixes bugzilla entry: 7182
http://bugzilla.kernel.org/show_bug.cgi?id=7182

With this patch we no longer append the directory part twice
before saving the config file.
This patch has been sent to Roman Zippel for review with no feedback.
It is so obviously simple that this should be OK to apply it anyway.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-10-01 11:48:53 +02:00
Sam Ravnborg e94c5bde70 kconfig/menuconfig: do not let ncurses clutter screen on exit
Do not initialize ncurses twice - it causes unpredicable
results. My display was sometimes weird after running
make menuconfig and I had to execute 'reset' to properly
restore my display.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:20 +02:00
Sam Ravnborg 737ecae264 kconfig/lxdialog: clear long menu lines
Menulines that were wider than the available
line width is now properly null terminated.

While at it renamed the variable choice => line_y
so it better reflect the usage in do_print_item().

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:20 +02:00
Sam Ravnborg c29121b787 kbuild: do not build mconf & lxdialog unless needed
Due to a limitation in kbuild all objects referred
by xxx-y or xxx-objs will be build when one of
the targets needs to e build.

This caused lxdialog to be build pulling in ncurses
that is not always available.
So avoid building mconf & lxdialog unless really needed.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:20 +02:00
Sam Ravnborg 903947d286 kconfig/lxdialog: fix make mrproper
No Makefile in scripts/kconfig/lxdialog anymore, so do not
go there during make mrproper.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:20 +02:00
Sam Ravnborg c8dc68ad0f kconfig/lxdialog: support resize
In all dialogs now properly catch KEY_RESIZE and take proper action.
In mconf try to behave sensibly when a dialog routine returns
-ERRDISPLAYTOOSMALL.

The original check for a screnn size of 80x19 is kept for now.
It may make sense to remove it later, but thats anyway what
much text is adjusted for.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:20 +02:00
Sam Ravnborg f3cbcdc955 kconfig/lxdialog: let <ESC><ESC> behave as expected
<ESC><ESC> is used to step one back in the dialogs.
When lxdialog became built-in pressing <ESC> once would cause one step back
and pressing <ESC><ESC> would cause two steps back.
This patch - based on concept from Roman Zippel <zippel@linux-m68k.org> -
makes one <ESC> a noop and pressing <ESC><ESC> will cause one step backward.

In addition the final yes/no dialog now has the option to go back to the
the kernel configuration. So if you get too far out you can now go back
to configuring the kernel without saving and starting all over again.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:20 +02:00
Sam Ravnborg 2982de6993 kconfig/menuconfig: lxdialog is now built-in
lxdialog was previously called as an external program causing screen
to flicker when used. With this patch lxdialog is now built-in.
It is loosly based om previous work by:  Petr Baudis <pasky@ucw.cz>

Following is a list of changes:
o Moved build of dialog routings to kconfig Makefile
o menubox + checklist uses a new item list to hold all menu items
o in util.c implmented helper function to deal with item list
o menubox now uses parameters to save scroll state (avoids temp file)
o textbox now get text to be displayed as parameter and not a file
o make sure to properly delete subwin's before main windows
o killed unused files: lxdialog.c msgbox.c
o modified return value for ESC to match direct calling
o in a few places the code has been adjusted to 80 char wide
o in textbox a small refactoring was made to make code remotely readable
o in mconf removed all unused stuff (functions/variables)

Following is a list of know short comings:
a) pressing ESC twice will be interpreted as two ESC presses
b) resize does not work. menuconfig needs to be restarted to be adjusted

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:19 +02:00
Sam Ravnborg 350b5b7638 kconfig/lxdialog: add a new theme bluetitle which is now default
The bluetitle theme is a slightly modified version of the colorscheme
that -mm users has been used to. The bluetitle is more readable especially
on some LCD screens so it is now default.
Anyone that really wants the old color selection can get it by selecting
the classic color theme:
make MENUCONFIG_COLOR=classic menuconfig

The bluetitle theme was modified by Roman Zippel <zippel@linux-m68k.org>
to further improve readability on LCD screens.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:19 +02:00
Sam Ravnborg 458972132a kconfig/lxdialog: add support for color themes and add blackbg theme
The blackbg theme was originally made by: Han Boetes
It was copied from a patch by "Randy.Dunlap" <rdunlap@xenotime.net>
which was also the inspiration source for the color theme support.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:19 +02:00
Sam Ravnborg 98e5a1579e kconfig/lxdialog: refactor color support
Clean up and refactor color support. All color support are now
in util.c including color definitions.
In the process introduced a global variable named 'dlg' which is
used all over to set color - thats the reason why all files are changed.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-30 11:19:19 +02:00
Robert P. J. Day b32c826847 kbuild: update help in top level Makefile
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 10:02:52 +02:00
Matthew Wilcox d3660a8cbd kconfig: support DOS line endings
Kconfig doesn't currently handle config files with DOS line endings.
While these are, of course, an abomination, etc, etc, it can be handy
to not have to convert them first.  It's also a tiny patch and even adds
support for lines ending in just \r or even \n\r.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:00 +02:00