Commit Graph

601 Commits

Author SHA1 Message Date
Michal Marek e3900e74f2 Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
There is one kconfig fix in the rc-fixes branch that I forgot to submit
for 3.8, so let's add it to the kconfig branch for 3.9-rc1.
2013-02-25 21:51:57 +01:00
Ben Hutchings 62dc989921 kbuild: Fix missing '\n' for NEW symbols in yes "" | make oldconfig >conf.new
According to Documentation/kbuild/kconfig.txt, the commands:

    yes "" | make oldconfig >conf.new
    grep "(NEW)" conf.new

should list the new config symbols with their default values.
However, currently there is no line break after each new symbol.  When
kconfig is interactive the user will type a new-line at this point,
but when non-interactive kconfig must print it.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reference: http://bugs.debian.org/636029
[regid23@nt1.in: Adjusted Ben's work to apply cleanly to this tree]
Reported-and-tested-by: Regid Ichira <regid23@nt1.in>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-02-19 13:48:36 +01:00
Roland Eggner 2c68115cb3 kconfig: nconf: rewrite labels of function keys line
>From: Roland Eggner <edvx1@systemanalysen.net>

More reasonable labels of function keys line.  Rename labels and keep menu
width, as required for fitting on COLUMNS=80 terminals:
•  s/Insts/Help 2/
•  s/Config/ShowAll/

Signed-off-by: Roland Eggner <edvx1@systemanalysen.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-02-09 01:42:41 +01:00
Roland Eggner 0b61650044 kconfig: nconf: rewrite help texts
>From: Roland Eggner <edvx1@systemanalysen.net>

Rewrite all help texts.  During several years lazy (incomplete) updates have
left behind a rather thick layer of dust.  Intentions:
(1)  Global help called by <F1> should document all  _currently_  implemented
     keybindings.
(2)  Different help texts called by <F3> resp. <F8><F1> should be consistent
     with (1) and with implementation:
     •  on plain menu entry
     •  in radiolist window
     •  in input windows for text, decimal or hexadecimal values
     •  in filename selection windows <F6> <F7>
     •  SymSearch specific help called by <F8> followed by <F1>
(3)  More reasonable window titles:
     Rename window title            s/README/Global help/
     Rename variable    s/nconf_readme/nconf_global_help/
     Rename window title       s/Instructions/Short help/
(4)  Consider which hints are most useful for first-time-users.

Signed-off-by: Roland Eggner <edvx1@systemanalysen.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998@free.fr: a few additional fixes]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-02-09 01:42:35 +01:00
Tiana Rakotovao Andriamahefa aed9934bf1 kconfig: fix a compiliation error when using make xconfig
When using make xconfig, the following compilation error appears :
   /usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Including stddef.h in scripts/kconfig/qconf.cc permits to avoid this error.

Signed-off-by: Tiana Rakotovao Andriamahefa <rkmahefa@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-01-30 10:16:43 +01:00
Roland Eggner c5ffa130f3 nconf: function keys line, change background color for better readability
•  In function keys line descriptions black on darkblue are almost
   impossible to read.  Change colors to black on brown.

Signed-off-by: Roland Eggner <edvx1@systemanalysen.net>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-24 11:43:44 +01:00
Wang YanQing 1bdbac478a menuconfig: Get rid of the top-level entries for "Load an Alternate/Save an Alternate"
Now we have Load/Save buttons to do the Load/Save
in the convenient place, so we can drop the
top-level entries.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-16 00:00:35 +01:00
Wang YanQing 6364fd0cb1 menuconfig: Add Save/Load buttons
If menuconfig have Save/Load button like alternative
.config editors, xconfig, nconfig, etc.We will have
a obvious benefit when use menuconfig just like
when we use others, we can Save/Load our .config quickly
and conveniently.

This patch add the Save/Load button for menuconfig.

[remove trailing space while at it for below line:
"*)  Formerly when I used Page Down and Page Up, the cursor would be set"
]

Changes:
V1-V2:
1:use PATH_MAX instead of hard code suggested by Yann E. MORIN
2:drop the spurious empty-line removal suggested by Yann E. MORIN
V2-V3:
1:ajust buttons position well centered reported by Yann E. MORIN

Signed-off-by: Wang YanQing <udknight@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-16 00:00:34 +01:00
Wang YanQing 77bdcfe548 kconfig:lxdialog: remove duplicate code
dialog.h has two line the same below:
extern char dialog_input_result[];
This patch remove one of them.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-27 20:46:23 +01:00
Wang YanQing 87727d453b menuconfig:inputbox: support navigate input position
This patch add support navigate input position *inside* the input
field with LEFT/RIGHT, so it is possible to modify the text in place.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-25 23:42:37 +01:00
Yann E. MORIN c2838e6ee2 scripts/kconfig: ensure we use proper CONFIG_ prefix
Now that we get the CONFIG_ prefix from the environment, we must
ensure we use the proper prefix in case the user has it set in
the environment.

Simply unexport CONFIG_ to fallback to our hard-coded default.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-12-20 23:02:03 +01:00
Zhangfei Gao 409f117e2d merge_config.sh: Add option to specify output dir
Provide a -O option to specify dir to put generated .config
Then merge_config.sh does not need to be copied to target dir,
for easy re-usage in other script

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Tested-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-12-09 18:22:17 +01:00
Michal Marek 527ffe5811 kconfig: Regenerate lexer
Apply changes from commit 177acf78 (kconfig: Fix malloc handling in conf
tools) to the _shipped file.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-11-20 12:12:57 +01:00
Alan Cox 177acf7846 kconfig: Fix malloc handling in conf tools
(and get them out of the noise in the audit work)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-11-20 12:12:47 +01:00
Yann E. MORIN 9a926d4354 kconfig: get CONFIG_ prefix from the environment
Currently, the CONFIG_ prefix is hard-coded in the kconfig frontends
executables. This means that two projects that use kconfig with
different prefixes can not share the same kconfig frontends.

Instead of hard-coding the prefix in the frontends, get it from the
environment, and revert back to hard-coded value if not found.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-11-20 11:20:08 +01:00
Yann E. MORIN b341f7882f kconfig: add a function to get the CONFIG_ prefix
Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means
the CONFIG_ prefix is hard-coded at compile time. This goes against
having a run-time defined CONFIG_ prefix.

Add a function that returns the CONFIG_ prefix to use (but keep the
current hard-coded behavior, to be changed in a later patch).

To avoid touching all the code that uses the CONFIG_ macro, we just
undef it, and define it to be a call to the function.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-11-20 11:20:08 +01:00
Yann E. MORIN 337a275d03 kconfig: remove CONFIG_ from string constants
Having the CONFIG_ prefix in string constants gets in the way of
using a run-time-defined CONFIG_ prefix.

Fix that by using temp growable strings (gstr) in which we printf
the text.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-11-20 11:20:08 +01:00
Krzysztof Mazur 7d5bb96629 menuconfig: fix extended colors ncurses support
The ncurses library allows for extended colors. The support for extended
colors support depends on wide-character support. ncurses headers
enable extended colors (NCURSES_EXT_COLORS) only when wide-character
support is enabled (NCURSES_WIDECHAR).

The "make menuconfig" uses wide-character ncursesw library, which can be
compiled with wide-character support, but does not define NCURSES_WIDECHAR
and it's using headers without wide-character (and extended colors) support.

This fixes problems with colors on systems with enabled extended colors
(like PLD Linux). Without this patch "make menuconfig" is hard to use.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-11-20 10:52:36 +01:00
Benjamin Poirier bad9955db1 menuconfig: Replace CIRCLEQ by list_head-style lists.
sys/queue.h and CIRCLEQ in particular have proven to cause portability
problems (reported on Debian Sarge, Cygwin and FreeBSD)

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-10-25 15:06:00 +02:00
Linus Torvalds 35e9a274fd Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig changes from Michal Marek:
 "kconfig in v3.7 is going to
   - initialize ncurses only once in menuconfig
   - be able to jump to a search result in menuconfig
   - change the misnomer oldnoconfig to a more meaningful name
     olddefconfig, keeping the old name as alias"

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
  menuconfig: Assign jump keys per-page instead of globally
  menuconfig: Do not open code textbox scroll up/down
  menuconfig: Add jump keys to search results
  menuconfig: Extend dialog_textbox so that it can return to a scrolled position
  menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses
  menuconfig: Remove superfluous conditionnal
  kconfig: document oldnoconfig to what it really does in conf.c
  kconfig/mconf.c: revision of curses initialization.
2012-10-12 10:28:52 +09:00
Linus Torvalds d43b7167d4 Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild fixes from Michal Marek:
 "Here are two fixes I intended to send after v3.6-rc7, but failed to do
  so.  So please pull them for v3.7-rc1 and they will be picked up by
  stable.

  The first one fixes gcc -x <language> syntax in various build-time
  tests, which icecream and possible other gcc wrappers did not
  understand (and yes, icecream is going to be fixed as well).

  The second one fixes make tar-pkg so that unpacking the tarball does
  not replace the /lib -> /usr/lib symlink on recent Fedora releases."

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: Fix gcc -x syntax
  kbuild: Do not package /boot and /lib in make tar-pkg
2012-10-08 07:56:10 +09:00
Jean Delvare b1e0d8b70f kbuild: Fix gcc -x syntax
The correct syntax for gcc -x is "gcc -x assembler", not
"gcc -xassembler". Even though the latter happens to work, the former
is what is documented in the manual page and thus what gcc wrappers
such as icecream do expect.

This isn't a cosmetic change. The missing space prevents icecream from
recognizing compilation tasks it can't handle, leading to silent kernel
miscompilations.

Besides me, credits go to Michael Matz and Dirk Mueller for
investigating the miscompilation issue and tracking it down to this
incorrect -x parameter syntax.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Cc: Bernhard Walle <bernhard@bwalle.de>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-10-03 09:03:24 +02:00
Yuta Ando 4eae518d4b localmodconfig: Fix localyesconfig to set to 'y' not 'm'
The kbuild target 'localyesconfig' has been same as 'localmodconfig'
since the commit 50bce3e "kconfig/streamline_config.pl: merge
local{mod,yes}config". The commit expects this script generates
different configure depending on target, but it was not yet implemented.

So I added code that sets to 'yes' when target is 'localyesconfig'.

Link: http://lkml.kernel.org/r/1349101470-12243-1-git-send-email-yuta.and@gmail.com

Cc: stable@vger.kernel.org # v3.2
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Yuta Ando <yuta.and@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@rostedt.homelinux.com>
2012-10-01 12:35:17 -04:00
Adam Lee fb16d8912d kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
As 67d34a6a39 said, 'oldnoconfig' doesn't
set new symbols to 'n', but instead sets it to their default values.

So, this patch replaces 'oldnoconfig' with 'olddefconfig', stop making
people confused, and keep the old name 'oldnoconfig' as an alias,
because people already are dependent on its behavior with the
counter-intuitive name.

Signed-off-by: Adam Lee <adam8157@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:18:07 +02:00
Benjamin Poirier 95ac9b3b58 menuconfig: Assign jump keys per-page instead of globally
At the moment, keys 1-9 are assigned to the first 9 search results. This patch
makes them assigned to the first 9 results per-page instead. We are much less
likely to run out of keys that way.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:09:24 +02:00
Benjamin Poirier 1a374ae619 menuconfig: Do not open code textbox scroll up/down
We don't need to explicitely use ncurses' scroll(). ncurses performs
vertical-motion optimization at wrefresh() time.

Using strace I confirmed that with the following patch curses still sends only
the new line of text to the terminal when scrolling up/down one line at a
time.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:09:24 +02:00
Benjamin Poirier 5e609addb1 menuconfig: Add jump keys to search results
makes it possible to jump directly to the menu for a configuration entry after
having searched for it with '/'. If this menu is not currently accessible we
jump to the nearest accessible parent instead. After exiting this menu, the
user is returned to the search results where he may jump further in or
elsewhere.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:09:24 +02:00
Benjamin Poirier 1d1e2caebb menuconfig: Extend dialog_textbox so that it can return to a scrolled position
We can now display other UI elements (menus) "on top" of a textbox and then
seemingly come back to it in the same state it was left.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:08:14 +02:00
Benjamin Poirier 537ddae75c menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses
The caller will be able to perform actions based on hotkeys in the displayed
text.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:08:14 +02:00
Benjamin Poirier b9d29abd98 menuconfig: Remove superfluous conditionnal
Because end_reached is set to 0 before the loop, the test "!end_reached" is
always true and can be removed. This structure was perhaps copied from the
similar one in back_lines().

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-27 18:08:13 +02:00
Adam Lee 1d52a4a791 kconfig: document oldnoconfig to what it really does in conf.c
As 67d34a6a39 said, the make target
'oldnoconfig' is a misnomer. It doesn't set new symbols to 'n', but
instead sets it to their default values.

This patch fixes the document in conf.c, and will submit another patch
to replace 'oldnoconfig' to 'olddefconfig'

Signed-off-by: Adam Lee <adam8157@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-08-31 16:56:51 +02:00
Dirk Gouders 3eb95c84ee kconfig/mconf.c: revision of curses initialization.
Since commit d0e1e09568 initscr() is called twice in mconf.

Do it only in init_dialog() in util.c and there also save the
cursor position for the signal handler in mconf.c.

Signed-off-by: Dirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-08-30 14:47:34 +02:00
Bill Pemberton 45f4c81d69 localmodconfig: Use my variable for loop in streamline_config.pl
perlcritic complains about $kconfig being reused in the foreach loop
at the end of read_kconfig.  Change it to a my variable.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-16 16:09:48 -04:00
Bill Pemberton e0d28694d3 localmodconfig: Use 3 parameter open in streamline_config.pl
Convert remaining open calls to use the perl's preferred 3 parameter
open.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-16 16:09:38 -04:00
Bill Pemberton 3f0c541316 localmodconfig: Rework find_config in streamline_config.pl
Change find_config function to read_config.  It now finds the config,
reads the config into an array, and returns the array.  This makes it
a little cleaner and changes the open to use perl's 3 option open.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-16 16:09:16 -04:00
Bill Pemberton 224a257190 localmodconfig: Set default value for ksource in streamline_config.pl
Running streamline_config.pl as it's shown it in the comment header,
you will get a warning about $ksource being uninitialized.  This is
because $ksource is set to ARGV[0], but the examples don't require any
arguments.  Fix by setting ksource to . if no ARGV[0] is given.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-16 16:08:37 -04:00
Linus Torvalds f6bcfc9dd4 Improve localmodconfig to remove even more unused module configs.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQFuLTAAoJEIy3vGnGbaoA+uoP/jBR7LDOMC85i3YIK8pgPoRU
 qQlTj2AoY9s1ZwZHoRoxAbiDoqYc/zQlI+60N7tKrbk0cGwo8vWVInOShRDPsVKv
 B8AQMGh1laje6C2lLzW43ZG00ZpG5AxxhXae9/mn+koLqHSj5qzy6UCpyieSWTt+
 HAnow+mlmyHyHRpdRv6/RCcO4gpag82V8fBmmBMeJv0GfSvDvHYRhFWYqwI7T0QC
 PMVBM59WhKUoFDG2RLOdgRP9lxBfGqPaH7yEpVJFYBDErA/AD5+RyLO7zqKWcwJw
 JJL/dj7bNB7S0AqELGJbKTXJL+Ir0YXfW+N9xzDcCOlScf54ZUwZmN+mligLC9on
 10tKRpZyzSxYa+3xsu2OzMuSEf0Px5uQOd5SeEcCLPwE2TQ5PMvSG4I9ACgXvfNq
 5i1NPe8K9W7rOjTe1Sb7s0uI+Sm8chYcMHtJPtlL4yQDWq1eeHJ0vi3snZhbfmLx
 VxogmmFpJzAx78d2KntaPOTBoA11pk3AmbTuBFLPfh4sSh8Xe80LZ9/AtFN6Eq4M
 B/9si3afTP62CCdqVYPaiUO/zPykCsz4NvgdAPhT0ESCdIDpr4SeC4iWaXj+teL3
 oifB0+qkOe8tJ4k2esMpfFU/igFWORNXvNjFwLeUw/4BT5WMVdnoSk1YatmakuIB
 bEYO5TGM4xZ5FBnSD37R
 =pYw7
 -----END PGP SIGNATURE-----

Merge tag 'localmodconfig-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig

Pull localmodconfig updates from Steven Rostedt:
 "Improve localmodconfig to remove even more unused module configs.

  These changes drastically improve the amount of module configs removed
  from a config file.  It also adds some debug that I can have users
  easily enable if things do not work for them."

* tag 'localmodconfig-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig:
  localmodconfig: Add debug environment variable LOCALMODCONFIG_DEBUG
  localmodconfig: Check if configs are already set for selects
  localmodconfig: Read in orig config file to avoid extra processing
  localmodconfig: Comments and cleanup for streamline_config.pl
2012-07-30 13:17:41 -07:00
Steven Rostedt 67d34a6a39 kconfig: Document oldnoconfig to what it really does
The make target 'oldnoconfig' is a misnomer. It doesn't set new symbols
to 'n', but instead sets it to their default values.

Unfortunately, assuming that it actually did this, broke ktest in some
of its tests. For example, the tests to create a minimum config and even
a config bisect, depends on removing various configs and using
oldnoconfig to get rid of other configs that may have depended on it.

But because some configs that it was trying to disable, were in fact
default enabled, this caused those configs to re-enable and corrupt the
test.

I thought about fixing oldnoconfig, but I'm afraid that people are
already dependent on its current behavior. Instead, I'm just updating
the documentation to state that it sets the new symbols to their default
values and not to 'n'.

Ideally, this would be called, 'olddefconfig' and we have an
'oldnoconfig' that actually disables the new symbols. But it's useless
for me now. If it changed, ktest would need to be consistent between
each version, and that would be to difficult to detect. I'll handle this
issue with ktest with other means.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-26 14:32:01 +02:00
Benjamin Poirier d68e818bc4 nconf: add u, d command keys in scroll windows
They function just like they do in less(1).
Also correct some discrepancy between the help text and the code wrt
function keys.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-26 12:20:46 +02:00
Benjamin Poirier 9d4792c9b4 menuconfig: add u, d, q command keys in text boxes
They function just like they do in less(1).

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-26 12:20:43 +02:00
Michal Marek 5b580fa671 kconfig: Print errors to stderr in the Makefile
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-13 23:04:30 +02:00
Cody Schafer 1a7a8c6fd8 kconfig: allow long lines in config file
For some config options (CONFIG_EXTRA_FIRMWARE, for example), the length
of a config file line can exceed the 1024 byte buffer.

Switch from fgets to compat_getline to fix. compat_getline is an
internally implimented getline work-alike for portability purposes.

Signed-off-by: Cody Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-13 22:51:30 +02:00
Paul Bolle 92b72e8bcb kconfig: remove lkc_defs.h from .gitignore and dontdiff
Commit 5a6f8d2bd9 ("kconfig: nuke
LKC_DIRECT_LINK cruft") removed all traces of lkc_defs.h from the tree.
Remove its entries in dontdiff and kconfig's .gitignore file too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-13 15:08:25 +02:00
Yaakov Selkowitz ebca026a79 xconfig: add quiet rule for moc
Also add a dependency on .tmp_qtcheck for KC_QT_MOC.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-13 14:27:17 +02:00
Yaakov Selkowitz 48485949b4 xconfig: use pkgconfig to find moc
Various schemes exist to allow parallel installations of multiple major
versions of Qt (4.x with the previous 3.x and/or the upcoming 5.x).
QtCore.pc includes a moc_location variable which should be a more reliable
way to find moc.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-13 14:27:13 +02:00
Yaakov Selkowitz 3725f3ed12 kconfig: fix check-lxdialog for DLL platforms
Import libraries on Cygwin and MinGW/MSYS use the .dll.a suffix, so
checking this suffix is necessary to make sure ncurses will still be
found when built without static libraries.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-04 18:28:14 +02:00
Yaakov Selkowitz 84354256bf kconfig: check ncursesw headers first in check-lxdialog
Commit 8c41e5e363 added a check for
ncursesw/curses.h for the case where ncurses and ncursesw are build
separately but only one is installed.  But if both are installed,
the headers ncurses/curses.h and ncursesw/curses.h differ, and since
libncursesw will be found first, so should ncursesw/curses.h.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-04 18:26:35 +02:00
Yaakov Selkowitz d7c67a2e93 kconfig/nconf: fix compile with ncurses reentrant API
ESCDELAY is a global variable which is replaced by getter and setter
functions with NCURSES_REENTRANT.  This fixes the following error:

nconf.c: In function ‘main’:
nconf.c:1506:2: error: lvalue required as left operand of assignment

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-04 18:23:48 +02:00
Steven Rostedt 4503379cb8 localmodconfig: Add debug environment variable LOCALMODCONFIG_DEBUG
If the environment variable LOCALMODCONFIG_DEBUG is set, then debug output
will appear in the make localmodconfig. This will simplify debugging what
people get with their output, as I can just tell people to do:

  LOCALMODCONFIG_DEBUG=1 make localmodconfig 2>out.txt

and have them send me the out.txt. I'll be able to see why things are not
working as they think it should be.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19 15:03:06 -04:00
Steven Rostedt d4bb58b5cb localmodconfig: Check if configs are already set for selects
There are some cases that a required module does not have a prompt
and needs to have another module enabled that selects it to be set.
As localmodconfig is conservative and tries to make the minimum config
without breaking the user's kernel, or keeping the user from using
devices that were loaded when the lsmod was done, all modules that
select this module will also be enabled.

If you needed module A, but module A did not have a prompt but needed
module B to be selected, localmodconfig would make sure B was still
enabled. If not only B selected A, but C, D, E, F, and G also
selected A, then all of those would also be included, as well as the
modules they depend on. This ballooned the number of configs that
localmodconfig would keep.

The fix here is to process the depends first, and then record those
configs that did not have a prompt and needed to be selected.
After the depends are done, check what configs are needed to select
the configs in the list, and if a config that selects it is already
set, then we don't need to do anything else.

If no config that selects the config is set, then just pick one and
try again.

This change brought down the number of selected modules from 290
to 67! Both before and after were run against a config that had 3095
modules enabled.

Tested-by: John David Yost <johnyost@ptd.net> # AlleyTrotter
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19 15:03:06 -04:00
Steven Rostedt 4f4c51c940 localmodconfig: Read in orig config file to avoid extra processing
Read in the entire config file. If there's a config that we depend on
that happens to be in the core set (not a module) then we do not need
to process it as a module.

Currently, we follow the entire depend and selects even if they
are enabled as core and not modules. By checking to make sure that we
only look at modules we can drop the count a little.

From one of my tests, localmodconfig went from taking 3095 set modules
down to 356 before this patch, and down to 290 modules after the change.

Tested-by: John David Yost <johnyost@ptd.net> # AlleyTrotter
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19 15:03:05 -04:00
Steven Rostedt 0b58a99eb2 localmodconfig: Comments and cleanup for streamline_config.pl
Added some more comments and cleaned up part of the the code to use
a named variable instead of one of the special $1 perl variables.

No functional changes.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19 15:03:05 -04:00
Linus Torvalds da85d3426f Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig changes from Michal Marek:

 - Error handling for make KCONFIG_ALLCONFIG=<...> all*config plus a fix
   for a bug that was exposed by this

 - Fix for the script/config utility.

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/config: properly report and set string options
  kbuild: all{no,yes,mod,def,rand}config only read files when instructed to.
  kconfig: Add error handling to KCONFIG_ALLCONFIG
2012-05-28 10:37:56 -07:00
Paul Gortmaker bb8187d35f MCA: delete all remaining traces of microchannel bus support.
Hardware with MCA bus is limited to 386 and 486 class machines
that are now 20+ years old and typically with less than 32MB
of memory.  A quick search on the internet, and you see that
even the MCA hobbyist/enthusiast community has lost interest
in the early 2000 era and never really even moved ahead from
the 2.4 kernels to the 2.6 series.

This deletes anything remaining related to CONFIG_MCA from core
kernel code and from the x86 architecture.  There is no point in
carrying this any further into the future.

One complication to watch for is inadvertently scooping up
stuff relating to machine check, since there is overlap in
the TLA name space (e.g. arch/x86/boot/mca.c).

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: x86@kernel.org
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-05-17 19:06:13 -04:00
Eric W. Biederman 9f420bf0f4 kbuild: all{no,yes,mod,def,rand}config only read files when instructed to.
Prevent subtle surprises to both people working on the kconfig code
and people using make allnoconfig allyesconfig allmoconfig and
randconfig by only attempting to read a config file if
KCONFIG_ALLCONFIG is set.

Common sense suggests attempting to read the extra config files does
not make sense unless requested.  The documentation says the code
won't attempt to read the extra config files unless requested.
Current usage does not appear to include people depending on the code
reading the config files without the variable being set So do the
simple thing and stop reading config files when passed
all{no,yes,mod,def,rand}config unless KCONFIG_ALLCONFIG environment
variable is set.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-05-07 20:51:06 +02:00
Eric W. Biederman 5efe241eac kconfig: Add error handling to KCONFIG_ALLCONFIG
- Only try to read the file specified if KCONFIG_ALL_CONFIG is set to
  something other than the empty string or "1".

- Don't use stat to check the name passed to conf_read_simple so that
  zconf_fopen can find the file in the current directory or in SRCTREE
  removing a extremely source of confusing failure, where KCONFIG_ALL_CONFIG
  was not interpreted with respect to the directory make was called in.

- If conf_read_simple fails complain clearly and stop processing.
  Allowing the simple debugging of typos.

- Clearly document the behavior so it is clear to users which
  values are treated as flags and which values are treated as
  filenames.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-05-05 00:24:07 +02:00
Paul Gortmaker e4757cab4c kconfig: delete last traces of __enabled_ from autoconf.h
We've now fixed IS_ENABLED() and friends to not require any special
"__enabled_" prefixed versions of the normal Kconfig options, so delete
the last traces of them being generated.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12 18:35:58 -07:00
Paul Gortmaker a959613533 Revert "kconfig: fix __enabled_ macros definition for invisible and un-selected symbols"
This reverts commit 953742c8fe.

Dumping two lines into autoconf.h for all existing Kconfig options
results in a giant file (~16k lines) we have to process each time we
compile something.  We've weaned IS_ENABLED() and similar off of
requiring the __enabled_ definitions so now we can revert the change
which caused all the extra lines.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12 18:35:58 -07:00
John Stultz 9875c42d69 merge_config.sh: Add option to display redundant configs
Provide a -r option to display when fragments contain redundant
options. This is really useful when breaking apart a config into
fragments, as well as cleaning up older fragments.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-03-30 15:14:47 +02:00
John Stultz 55cae3043a merge_config.sh: Set execute bit
Somehow the merge_config.sh script didn't get its execute bit
set when it was merged. Fix this.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-03-30 15:10:48 +02:00
Josh Boyer 09280615a0 merge_config.sh: Use the first file as the initial config
Take the first config fragment and use it verbatim as the initial config
set.  This avoids running the verification loop for the first file, as
nothing has actually been merged at this point.  This significantly
increases performance for large config fragments.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-03-24 23:25:40 +01:00
Arnaud Lacombe 5d09598d48 kconfig: fix new choices being skipped upon config update
Running `oldconfig' after any of the following configuration change:

either trivial addition, such as:

config A
	bool "A"

choice
	prompt "Choice ?"
	depends on A

	config CHOICE_B
		bool "Choice B"

	config CHOICE_C
		bool "Choice C"
endchoice

or more tricky change:

OLD KCONFIG                      |  NEW KCONFIG
                                 |
                                 |  config A
                                 |          bool "A"
                                 |
choice                           |  choice
        prompt "Choice ?"        |          prompt "Choice ?"
                                 |
        config CHOICE_C          |          config CHOICE_C
                bool "Choice C"  |                  bool "Choice C"
                                 |
        config CHOICE_D          |          config CHOICE_D
                bool "Choice D"  |                  bool "Choice D"
endchoice                        |
                                 |          config CHOICE_E
                                 |                  bool "Choice E"
                                 |                  depends on A
                                 |  endchoice

will not cause the choice to be considered as NEW, and thus not be
asked. The cause of this behavior is that choice's novelty are computed
statically right after the saved configuration has been read. At this
point, the new dependency's value is still unknown and asserted to be
`no'. Moreover, no update to this decision is made afterward.

Correct this by dynamically evaluating a choice's novelty, and removing the
static evaluation.

Reported-and-tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-26 11:01:56 +01:00
Linus Torvalds 287b901dca Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  menuconfig: fix a regression when canceling the prompt dialog at exit
  kbuild: Fix compiler warning with assertion when calling 'fwrite'
  Improve update-po-config output
  menuconfig: let make not report error when not save configuration
  merge_config.sh: fix bug in final check
  merge_config.sh: whitespace cleanup
  merge_config.sh: use signal names compatible with dash and bash
  kconfig: add merge_config.sh script
  kconfig: use xfwrite wrapper function to silence warnings
  kconfig: fix set but not used warnings
  kconfig: fix warnings by specifing format arguments
2012-01-16 14:35:34 -08:00
Li Zefan 30c4eaafac menuconfig: fix a regression when canceling the prompt dialog at exit
This commit fixes a bug, while introducing a new one..

commit 7203ddbd4be9720649e47d756a001e0c7d7f8ae2
Author: Wang YanQing <udknight@gmail.com>
Date:   Thu Jan 12 11:31:32 2012 +0800

    menuconfig: let make not report error when not save configuration

Pressing ESC should cancel the yes/no dialog and return back to
the main menu, but not exit from menuconfig.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-16 14:40:16 +01:00
Arnaud Lacombe 37ae2d5998 kbuild: Fix compiler warning with assertion when calling 'fwrite'
Reinhard Tartler discovered a corner case of calling xfwrite() where the
length of the string is zero.

Arnaud Lacombe suggested to use assertion for the corner case, as
fwrite(3) is currently used:

 1) in comment printers. Empty comment are not allowed.
 2) in a callback passed to expr_print(), where the string printed is
    either NULL OR non-empty.
 3) in the lexer, auto-generated, and unused.

I feel using assertion is a good solution:

 1) It cleanly takes care of the above-mentioned corner case.
 2) It can be easily disabled by defining NDEBUG.
 3) It asserts xfwrite() is simply a wrapper for fwrite().

Reported-by: Reinhard Tartler <Reinhard.Tartler@informatik.uni-erlangen.de>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-15 00:17:18 +01:00
Peter Foley e2aef4d33a Improve update-po-config output
Make the V=0 output from update-po-config be aligned correctly.
Also remove an outdated comment and add a "GEN" statement.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-15 00:13:53 +01:00
Wang YanQing c55ac15401 menuconfig: let make not report error when not save configuration
I find every time when I choice the 'NO' button at the dialog
which let me choice whether to save the configuration before exit
menuconfig, it always report the blow:

" GEN     /mnt/sda7/home/build/test/Makefile
  HOSTCC  scripts/kconfig/mconf.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig

Your configuration changes were NOT saved.

make[2]: *** [menuconfig] Error 1
make[1]: *** [menuconfig] Error 2
make: *** [sub-make] Error 2 "

This patch repair it.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Acked-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-14 21:54:32 +01:00
John Stultz 320d41bb15 merge_config.sh: fix bug in final check
Arnaud Lacombe pointed out the final checking that the requested configs
were included in the final .config was broken.

The example was that if you had a fragment that disabled
CONFIG_DECOMPRESS_GZIP applied to a normal defconfig, there would be no
final warning that CONFIG_DECOMPRESS_GZIP was acutally set in the final
.config.

This bug was introduced by me in v3 of the original patch, and the
following patch reverts the invalid change.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Reported-by: Arnaud Lacombe <lacombar@gmail.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-14 21:44:29 +01:00
Darren Hart c0c0cda276 merge_config.sh: whitespace cleanup
Fix whitespace usage in the clean_up routine.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-14 21:44:29 +01:00
Darren Hart 041b78c89b merge_config.sh: use signal names compatible with dash and bash
The SIGHUP SIGINT and SIGTERM names caused failures when running
merge_config.sh with the dash shell.  Dropping the "SIG" component makes
the script work in both bash and dash.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-14 21:44:29 +01:00
john stultz 4b5f72145e kconfig: add merge_config.sh script
After noticing almost every distro has their own method of managing config
fragments, I went looking at some best practices, and wanted to try to
consolidate some of the different approaches so this fairly simple
infrastructure can be shared (and new distros/build systems don't have to
implement yet another config fragment merge script).

This script is most influenced by the Windriver tools used in the Yocto
Project, reusing some portions found there.

This script merges multiple config fragments, warning on any overridden
values.  It then sets any unspecified values to their default, then
finally checks to make sure no specified value was dropped due to
unsatisfied dependencies.

I'm sure this implementation won't work for everyone, and I expect it will
need to evolve to adapt for various use cases.  But I think its a
reasonable starting point.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Greg Thelen <gthelen@google.com>
Cc: Reinhard Tartler <Reinhard.Tartler@informatik.uni-erlangen.de>
Cc: Dmitry Fink <Dmitry.Fink@palm.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: Bruce Ashfield <Bruce.Ashfield@windriver.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-01-14 21:44:28 +01:00
Steven Rostedt 364212fdda kconfig/streamline-config.pl: Fix parsing Makefile with variables
Thomas Lange reported that when he did a 'make localmodconfig', his
config was missing the brcmsmac driver, even though he had the module
loaded.

Looking into this, I found the file:
drivers/net/wireless/brcm80211/brcmsmac/Makefile
had the following in the Makefile:

MODULEPFX := brcmsmac

obj-$(CONFIG_BRCMSMAC)  += $(MODULEPFX).o

The way streamline-config.pl works, is parsing all the
 obj-$(CONFIG_FOO) += foo.o
lines to find that CONFIG_FOO belongs to the module foo.ko.

But in this case, the brcmsmac.o was not used, but a variable in its place.

By changing streamline-config.pl to remember defined variables in Makefiles
and substituting them when they are used in the obj-X lines, allows
Thomas (and others) to have their brcmsmac module stay configured
when it is loaded and running "make localmodconfig".

Reported-by: Thomas Lange <thomas-lange2@gmx.de>
Tested-by: Thomas Lange <thomas-lange2@gmx.de>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-01-13 18:01:48 -05:00
Steven Rostedt d060d963e8 kconfig/streamline-config.pl: Simplify backslash line concatination
Simplify the way lines ending with backslashes (continuation) in Makefiles
is parsed. This is needed to implement a necessary fix.

Tested-by: Thomas Lange <thomas-lange2@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-01-13 18:01:39 -05:00
Paul Bolle fa0ad6575f kconfig: adapt update-po-config to new UML layout
Commit 5c48b108 ("um: take arch/um/sys-x86 to arch/x86/um") broke the
make target update-po-config, as its symlink trick (again) fails.
(Previous breakage was fixed with commit bdc69ca4 ("kconfig: change
update-po-config to reflect new layout of arch/um").)

The new UML layout allows to drop the symlick trick entirely. And if,
one day, another architecture supports UML too, that should now work
without again breaking this make target.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-12-18 22:07:52 +01:00
Peter Foley 70cc01e757 kconfig: use xfwrite wrapper function to silence warnings
Use the xfwrite wrapper function defined in lkc.h to check the return value of
fwrite and silence these warnings.

  HOSTCC  scripts/kconfig/zconf.tab.o
scripts/kconfig/zconf.tab.c: In function 'header_print_comment':
/usr/src/lto/scripts/kconfig/confdata.c:551:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/zconf.tab.c: In function 'kconfig_print_comment':
/usr/src/lto/scripts/kconfig/confdata.c:467:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-12-18 21:54:12 +01:00
Peter Foley 4f0c28f779 kconfig: fix set but not used warnings
Remove set but not used variables to fix warnings.

  HOSTCC  scripts/kconfig/gconf.o
/usr/src/lto/scripts/kconfig/gconf.c: In function 'change_sym_value':
/usr/src/lto/scripts/kconfig/gconf.c:833:11: warning: variable 'oldval' set but not used [-Wunused-but-set-variable]
/usr/src/lto/scripts/kconfig/gconf.c: In function 'update_tree':
/usr/src/lto/scripts/kconfig/gconf.c:1281:19: warning: variable 'prop' set but not used [-Wunused-but-set-variable]

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-12-11 21:29:45 +01:00
Peter Foley a7d6f6e407 kconfig: fix warnings by specifing format arguments
Specify format arguments to fix warnings.

  HOSTCC  scripts/kconfig/gconf.o
/usr/src/lto/scripts/kconfig/gconf.c: In function 'on_introduction1_activate':
/usr/src/lto/scripts/kconfig/gconf.c:686:6: warning: format not a string literal and no format arguments
/usr/src/lto/scripts/kconfig/gconf.c: In function 'on_about1_activate':
/usr/src/lto/scripts/kconfig/gconf.c:704:6: warning: format not a string literal and no format arguments
/usr/src/lto/scripts/kconfig/gconf.c: In function 'on_license1_activate':
/usr/src/lto/scripts/kconfig/gconf.c:723:6: warning: format not a string literal and no format arguments

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-12-11 21:25:54 +01:00
Cheng Renquan 93072c3eca scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox
to make it easier to locate begin/end when editing long strings;

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Acked By: Nir Tzachar <nir.tzachar@gmail.com>
2011-09-09 14:40:08 +02:00
Cheng Renquan e631a57a19 scripts/kconfig/nconf: fix editing long strings
The original dialog_inputbox doesn't work with longer than prompt_width
strings, here fixed it in this way:
1) add variable cursor_form_win to record cursor of form_win,
   keep its value always between [0, prompt_width-1];
   reuse the original cursor_position as cursor of the string result,
   use (cursor_position-cursor_form_win) as begin offset to show part of
   the string in form_win;

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Nir Tzachar <nir.tzachar@gmail.com>
2011-09-09 14:40:08 +02:00
Cheng Renquan 5ea9f64ffc scripts/kconfig/nconf: dynamically alloc dialog_input_result
To support unlimited length string config items;

No check for realloc return value keeps code simple, and to be
consistent with other existing unchecked malloc in kconfig.

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-09-09 14:40:08 +02:00
Cheng Renquan cd58a90fa6 scripts/kconfig/nconf: fix memmove's length arg
In case KEY_BACKSPACE / KEY_DC to delete a char, it memmove only
(len-cursor_position+1) bytes;
the default case is to insert a char, it should also memmove exactly
(len-cursor_position+1) bytes;

the original use of (len+1) is wrong and may access following memory
that doesn't belong to result, may cause SegFault in theory;

	case KEY_BACKSPACE:
		if (cursor_position > 0) {
			memmove(&result[cursor_position-1],
					&result[cursor_position],
					len-cursor_position+1);
			cursor_position--;
		}
		break;
	case KEY_DC:
		if (cursor_position >= 0 && cursor_position < len) {
			memmove(&result[cursor_position],
					&result[cursor_position+1],
					len-cursor_position+1);
		}
		break;
	default:
		if ((isgraph(res) || isspace(res)) &&
				len-2 < result_len) {
			/* insert the char at the proper position */
			memmove(&result[cursor_position+1],
					&result[cursor_position],
					len-cursor_position+1);
			result[cursor_position] = res;
			cursor_position++;
		}

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Acked-by: Nir Tzachar <nir.tzachar@gmail.com>
2011-09-09 14:40:08 +02:00
Cheng Renquan 4e24dbfc26 scripts/kconfig/nconf: fix typo: unknow => unknown
Signed-off-by: Cheng Renquan <crquan@gmail.com>
Acked-by: Arnaud Lacombe <lacombar@gmail.com>
2011-09-09 14:40:08 +02:00
Michal Marek 6a19492fc2 Merge branch 'kconfig/for-next' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig 2011-08-31 12:06:36 +02:00
Lucas De Marchi 702a945028 kconfig: fix set but not used variables
Some variables were being set but never used, which was triggering
warnings in GCC >= 4.6.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-08-29 20:22:26 -04:00
Davidlohr Bueso 564899f9f0 kconfig: handle SIGINT in menuconfig
I recently got bitten in the ass when pressing Ctrl-C and lost all my current
configuration changes. This patch captures SIGINT and allows the user to save
any changes.

Some code refactoring was made in order to handle the exit behavior.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-08-29 20:21:29 -04:00
Arnaud Lacombe 953742c8fe kconfig: fix __enabled_ macros definition for invisible and un-selected symbols
__enabled_<sym-name> are only generated on visible or selected entries, do not
reflect the purpose of its introduction.

Fix this by always generating these entries for named symbol.

Reported-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-08-29 20:19:48 -04:00
Michal Marek db57630b7a Merge branch 'master/kconfig-localmodconfig' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig 2011-08-19 16:04:53 +02:00
Arnaud Lacombe 57e6292da6 kconfig: factor code in menu_get_ext_help()
Cc: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-08-08 16:02:03 +02:00
Srinivas Kandagatla 3f198dfee4 kbuild: Fix help text not displayed in choice option.
Help text under choice menu is never displayed because it does not have
symbol name associated with it, however many kconfigs have help text
under choice, assuming that it will be displayed when user selects help.
for example in Kconfig if we have:
choice
        prompt "Choice"
        ---help---
           HELP TEXT ...

config A
        bool "A"

config B
        bool "B"

endchoice

Without this patch "HELP TEXT" is not displayed when user selects help
option when "Choice" is highlighted from menuconfig or xconfig or
gconfig.

This patch changes the logic in menu_get_ext_help to display help for
cases which dont have symbol names like choice.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Reviewed-by: Stuart Menefy <stuart.menefy@st.com>
Reviewed-by: Arnaud Lacombe <lacombar@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-08-08 16:01:54 +02:00
Arnaud Lacombe 4920e05c79 kconfig/nconf: nuke unreferenced `nohelp_text'
After commit 5416857867, nohelp_text' is no
longer referenced, nuke it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-08-08 15:26:51 +02:00
Arnaud Lacombe 50bce3e807 kconfig/streamline_config.pl: merge local{mod,yes}config
The two targets `localmodconfig' and `localyesconfig' only differs from the
sed(1) ran on the result of `streamline_config.pl' to convert symbols set to
`modules' to `yes'. This conversion can be made directly from the perl script,
and thus avoid duplicating the command to generate the configuration.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-08-08 01:44:27 -04:00
Arnaud Lacombe 22d550ae83 kconfig/streamline_config.pl: use options to determine operating mode
The options introduced are --localmodconfig (default) and --localyesconfig.
They match the Makefile target behavior.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-08-08 01:44:26 -04:00
Arnaud Lacombe f597a71829 kconfig/streamline_config.pl: directly access LSMOD from the environment
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-08-08 01:44:25 -04:00
Linus Torvalds 1d3fe4a75b Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (25 commits)
  kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()
  xconfig: Abort close if configuration cannot be saved
  kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.h
  kconfig/nconf: remove useless conditionnal
  kconfig/nconf: prevent segfault on empty menu
  kconfig/nconf: use the generic menu_get_ext_help()
  nconfig: Avoid Wunused-but-set warning
  kconfig/conf: mark xfgets() private
  kconfig: remove pending prototypes for kconfig_load()
  kconfig/conf: add command line options' description
  kconfig/conf: reduce the scope of `defconfig_file'
  kconfig: use calloc() for expr allocation
  kconfig: introduce specialized printer
  kconfig: do not overwrite symbol direct dependency in assignment
  kconfig/gconf: silent missing prototype warnings
  kconfig/gconf: kill deadcode
  kconfig: nuke LKC_DIRECT_LINK cruft
  kconfig: nuke reference to SWIG
  kconfig: add missing <stdlib.h> inclusion
  kconfig: add missing <ctype.h> inclusion
  ...

Fix up conflicts in scripts/kconfig/Makefile
2011-07-30 00:17:06 -07:00
Michal Marek 2a11c8ea20 kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()
Replace the config_is_*() macros with a variant that allows for grepping
for usage of CONFIG_* options in the code. Usage:

  if (IS_ENABLED(CONFIG_NUMA))

or

  #if IS_ENABLED(CONFIG_NUMA)

The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y'
or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if
the option is 'm'. Only boolean and tristate options are supported.

Reviewed-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-29 21:53:30 +02:00
Michal Marek bac6aa865b xconfig: Abort close if configuration cannot be saved
Give the user an opportunity to fix the error or save the configuration
under a different path.

Reported-by: Hiromu Yakura <hiromu1996@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-25 15:50:34 +02:00
Arnaud Lacombe eb4cf5a642 kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.h
The specialized printer for headers (espectially autoconf.h) is missing
fixup code for S_HEX symbol's "0x" prefix. As long as kconfig does not
warn for such missing prefix, this code is needed. Fix this.

In the same time, fix some nits in `header_print_symbol()'.

Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>

Broken-by: Arnaud Lacombe <lacombar@gmail.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-18 16:29:29 +02:00
Arnaud Lacombe a1e806550e kconfig/nconf: remove useless conditionnal
After the test

	if (!submenu || ...)
		continue;

the variable `submenu' can _not_ be NULL, so do not test for this
situation.

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:54:01 +02:00
Arnaud Lacombe f98ee76955 kconfig/nconf: prevent segfault on empty menu
nconf does not check the validity of the current menu when help is
requested (with either <F2>, '?' or 'h'). This leads to a NULL pointer
dereference when an empty menu is encountered.

The following reduced testcase exposes the problem:

config DEP
        bool

menu "FOO"

config BAR
        bool "BAR"
        depends on DEP

endmenu

Issue will happen when entering menu "FOO" and requesting help.

nconf is the only front-end which do not filter the validity of the
current menu. Such filter can not really happen beforehand as other key
which does not deals with the current menu might be entered by the user,
so just bails out earlier if we encounter an invalid menu.

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:48:11 +02:00
Arnaud Lacombe 5416857867 kconfig/nconf: use the generic menu_get_ext_help()
nconf is the only front-end which does not use this helper, but prefer
to copy/paste the code. The test wrt. menu validity added in this
version of the code is bogus anyway as an invalid menu will get
dereferenced a few line below by calling menu_get_prompt().

For now, convert nconf to use menu_get_ext_help(), as do every other
front-end. We will deals with menu validity checks properly in a
separate commit.

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:48:08 +02:00
Raghavendra D Prabhu e9882ac0e5 nconfig: Avoid Wunused-but-set warning
I am seeing Wunused-but-set warning while make nconfig.  Looks like
active_menu is not used. Removing it fixes the warning.

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:47:09 +02:00
Michal Marek 5c74cd4cc7 Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig 2011-07-04 11:24:10 +02:00
Arnaud Lacombe ab63f58f25 kconfig/conf: mark xfgets() private
This function has not much reason to be public. In the mean time, convert
declaration from K&R C to ISO C.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:40 -04:00
Arnaud Lacombe 131c60a95e kconfig: remove pending prototypes for kconfig_load()
Commit 5a6f8d2bd9 removed `kconfig_load()',
however, it missed an hidden prototypes in `lkc.h'. Fix this.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:39 -04:00
Arnaud Lacombe 32543999f3 kconfig/conf: add command line options' description
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:39 -04:00
Arnaud Lacombe 275744cc8d kconfig/conf: reduce the scope of `defconfig_file'
This variable is not used outside of main() so there is not much reason keeping
it global. Ensure it is initialized as gcc has no way to know that normal
execution path expect only one option switch to be given on the command line
(except when we request help). As a result, we always initialize
`defconfig_file' before using it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:38 -04:00
Arnaud Lacombe 8494453ad5 kconfig: use calloc() for expr allocation
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02 01:04:37 -04:00
Arnaud Lacombe e54e692ba6 kconfig: introduce specialized printer
Make conf_write_symbol() grammar agnostic to be able to use it from different
code path. These path pass a printer callback which will print a symbol's name
and its value in different format.

conf_write_symbol()'s job become mostly only to prepare a string for the
printer. This avoid to have to pass specialized flag to generic
functions

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
[mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx
macro)]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-01 16:23:27 +02:00
Arnaud Lacombe ec6452a5ec kconfig: do not overwrite symbol direct dependency in assignment
Considering the following configuration:

config F
    bool "F"

choice AB
    bool "AB"
config A
    bool "A"
config B
    bool "B"
endchoice

if A
config D
    bool
    default y if F
    select E
config E
    bool "E"
endif

if B
config D
    bool
    default y if F
    select E
config E
    bool "E"
endif

The following configuration:

 CONFIG_F=y
 CONFIG_A=y
 # CONFIG_B is not set
 CONFIG_D=y
 CONFIG_E=y

emits a spurious warning:

(D) selects E which has unmet direct dependencies (B)

If a symbol appears in two different branch of the tree, it should inherit the
dependency of both parent, not just the last one.

Reported-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Tested-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-24 17:21:27 +02:00
Arnaud Lacombe 2f76b358f9 kconfig: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:45 -04:00
Arnaud Lacombe 378dbb2cf5 kconfig: migrate parser to implicit rules
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:44 -04:00
Arnaud Lacombe 674eed8a6a kconfig/zconf.l: do not ask to generate backup
This avoids the creation of a top-level `lex.backup' when the lexer gets
re-generated.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:44 -04:00
Arnaud Lacombe b96a0d0c78 kconfig: kill no longer needed reference to YYDEBUG
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:43 -04:00
Arnaud Lacombe 61f956f576 kconfig: constify `kconf_id_lookup'
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-09 14:04:42 -04:00
Michal Marek 36fee53510 Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig 2011-06-08 18:03:57 +02:00
Arnaud Lacombe 1ea3ad4e93 kconfig/gconf: silent missing prototype warnings
As the `gconf' frontend is un-maintained, go the easy way by silencing
the "warning: no previous prototype for '<fn>'" warnings.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:23 -04:00
Arnaud Lacombe f8aea775c1 kconfig/gconf: kill deadcode
The only call site of renderer_toggled() has been commented out since Apr. 2003,
as per Linus' Linux history repository:

 commit e7f67eb3c0570aa50c1cc0707b478a6d93bdc255
 Author: Roman Zippel <zippel@linux-m68k.org>
 Date:   Fri Apr 4 04:18:05 2003 -0800

    [PATCH] gconf update

    A gconf update by Romain Li<C3><A9>vin <roms@tilp.info>
    - fixed bug when double-clicking for changing value.
    - expand row when enabling a row with a submenu.
    - various bug fixes

As this result in a warning:

scripts/kconfig/gconf.c:891:13: warning: 'renderer_toggled' defined but not used

just nuke that code.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:22 -04:00
Arnaud Lacombe 5a6f8d2bd9 kconfig: nuke LKC_DIRECT_LINK cruft
This interface is not (and has never been ?) used by any frontend, just get rid
of it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:20 -04:00
Arnaud Lacombe 84250386ef kconfig: nuke reference to SWIG
SWIG is not used (yet?) to create kconfig binding, so there is no point
referencing it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:18 -04:00
Arnaud Lacombe 02d95c96c3 kconfig: add missing <stdlib.h> inclusion
This header is needed when using {m,re}alloc(3) and free(3) function family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:16 -04:00
Arnaud Lacombe dd003306a4 kconfig: add missing <ctype.h> inclusion
This header is needed when using isspace(3) function family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:15 -04:00
Arnaud Lacombe 10a4b2772e kconfig: add missing <stdarg.h> inclusion
This header is needed when using va_{start,end,copy}(3) functions family.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:13 -04:00
Arnaud Lacombe 75f1468bea kconfig: fix return code for invalid boolean symbol in conf_set_sym_val()
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:11 -04:00
Arnaud Lacombe d8fc320079 kconfig: annotate non-trivial fall-trough
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06 15:32:10 -04:00
Michal Marek ac9a126571 Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig 2011-05-25 15:33:20 +02:00
Michal Marek 4c54f0f846 kconfig: Only generate config_is_xxx for bool and tristate options
For strings and integers, the config_is_xxx macros are useless and
sometimes misleading:

  #define CONFIG_INITRAMFS_SOURCE ""
  #define config_is_initramfs_source() 1

Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-25 15:26:25 +02:00
Arnaud Lacombe d49e46875c xconfig: merge code path to conf_write()
Avoid to have multiple path saving the config. This fixes an error check
miss when the window is being closed and the user requested the config
to be written.

Reported-by: Hiromu Yakura <hiromu1996@gmail.com>
Pointed-out-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-25 15:05:07 +02:00
Michal Marek 51f31afd12 Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig 2011-05-24 17:16:21 +02:00
Arnaud Lacombe bdebd4892e kconfig: do not record timestamp in .config
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 16:13:40 +02:00
Eduardo Silva 6ef3d36eee gconfig: Hide unused left treeview when start up the interface
When the gconfig program starts in full mode view, it shows the
left treeview which belongs to the 'split mode view'. The patch
fix this visual issue.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 15:41:51 +02:00
Eduardo Silva 2626e67402 gconfig: enable rules hint for main treeviews
Due to the large amount of rows in the treeviews, is difficult to
match columns with rows, setting the rules hint to 'true' allows the
treeview to alternate background colors in the rows making the data
more readable.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24 15:41:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD de125187dc kconfig: autogenerated config_is_xxx macro
this will allow to use to use

	if(config_is_xxx())
	if(config_is_xxx_module())

in the code instead of

	#ifdef CONFIG_xxx
	#ifdef CONFIG_xxx_MODULE

and now let the compiler remove the non usefull code and not the
pre-processor

as done in the mach-types for arm as exmaple

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-17 15:59:23 +02:00
Peter Foley 2d80eb0fa3 kconfig: quiet commands when V=0
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29 10:41:15 +02:00
Peter Foley bdc69ca4cf kconfig: change update-po-config to reflect new layout of arch/um
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29 10:41:02 +02:00
Peter Foley a24a1b8e2a kconfig: make update-po-config work in KBUILD_OUTPUT
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29 10:40:45 +02:00
Peter Foley b24d7d7b98 kconfig: rearrange clean-files
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29 10:40:33 +02:00
Peter Foley d02ab886dc kconfig: change gconf to modify hostprogs-y like nconf and mconf
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29 10:40:16 +02:00
Peter Foley f19430496a kconfig: change qconf to modify hostprogs-y like nconf and mconf
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29 10:39:44 +02:00
Peter Foley 1f594715bd kconfig: only build kxgettext when needed
Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29 10:39:11 +02:00
Stephen Boyd 10175ba65f nconfig: Silence unused return values from wattrset
Ignore the return value from wattrset since we ignore the return
value in nconf.gui.c as well.

scripts/kconfig/nconf.c: In function 'print_function_line':
scripts/kconfig/nconf.c:376: warning: value computed is not used
scripts/kconfig/nconf.c:380: warning: value computed is not used
scripts/kconfig/nconf.c:387: warning: value computed is not used
scripts/kconfig/nconf.c: In function 'show_menu':
scripts/kconfig/nconf.c:956: warning: value computed is not used
scripts/kconfig/nconf.c:961: warning: value computed is not used
scripts/kconfig/nconf.c:963: warning: value computed is not used
scripts/kconfig/nconf.c:965: warning: value computed is not used

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-19 09:21:52 +02:00
Michal Marek c33724a438 kconfig: Do not record timestamp in auto.conf and autoconf.h
Timestamps in file data are useless and there is already one in .config

Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18 14:20:38 +02:00
Yann E. MORIN 2b2112f617 kconfig: get rid of unused flags
Now that we detect recusrion of sourced files, get rid of
now unused flags.

Regenerate lex.zconf.c_shipped file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-15 15:12:57 +02:00
Yann E. MORIN f094f8a1b2 kconfig: allow multiple inclusion of the same file
Allow 'source'ing the same file from multiple places (eg. from
different files, and/or under different conditions).

To avoid circular inclusion, scan the source-ancestry of the
current file, and abort if already sourced in this branch.

Regenerate the pre-parsed lex.zconf.c_shipped file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-15 15:12:48 +02:00
Ben Hutchings 466de91835 kconfig: Avoid buffer underrun in choice input
commit 40aee729b3 ('kconfig: fix default
value for choice input') fixed some cases where kconfig would select
the wrong option from a choice with a single valid option and thus
enter an infinite loop.

However, this broke the test for user input of the form 'N?', because
when kconfig selects the single valid option the input is zero-length
and the test will read the byte before the input buffer.  If this
happens to contain '?' (as it will in a mips build on Debian unstable
today) then kconfig again enters an infinite loop.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org [2.6.17+]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-08 12:05:20 +02:00
Uwe Kleine-König cce1dac871 trivial: Fix Steven's Copyright typos
OK, the copyright allows you to write a copy, still I think the lawyers
prefer the correct spelling.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
LKML-Reference: <1295899921-11333-1-git-send-email-u.kleine-koenig@pengutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-02-08 17:14:31 -05:00
Linus Torvalds f28b1c8aaa Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  nconf: handle comment entries within choice/endchoice
  kconfig: fix warning
  kconfig: Make expr_copy() take a const argument
  kconfig: simplify select-with-unmet-direct-dependency warning
  kconfig: add more S_INT and S_HEX consistency checks
  kconfig: fix `zconfdebug' extern declaration
  kconfig/conf: merge duplicate switch's case
  kconfig: fix typos
  kbuild/gconf: add dummy inline for bind_textdomain_codeset()
  kbuild/nconf: fix spaces damage
  kconfig: nuke second argument of conf_write_symbol()
  kconfig: do not define AUTOCONF_INCLUDED
  kconfig: the day kconfig warns about "select"-abuse has come
2011-01-10 08:28:17 -08:00
Peter Korsgaard 39177ec362 nconf: handle comment entries within choice/endchoice
Equivalent to af6c1598 (kconfig: handle comment entries within
choice/endchoice), but for nconfig instead.

Implement support for comment entries within choice groups. Comment entries
are displayed visually distinct from normal configs, and selecting them is
a no-op.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-07 15:45:28 +01:00
Jan Beulich 7ad1227818 kconfig: fix undesirable side effect of adding "visible" menu attribute
This lead to non-selected, non-user-selectable options to be written
out to .config. This is not only pointless, but also preventing the
user to be prompted should any of those options eventually become
visible (e.g. by de-selecting the *_AUTO options the "visible"
attribute was added for.

Furthermore it is quite logical for the "visible" attribute of a menu
to control the visibility of all contained prompts, which is what the
patch does.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-29 23:31:34 +01:00
Arnaud Lacombe 0597fcd08b kconfig: fix warning
In file included from scripts/kconfig/zconf.tab.c:2502:
scripts/kconfig/expr.c:1033: warning: no previous prototype for 'expr_simplify_unmet_dep'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-27 21:46:47 +01:00
Michal Marek 17742dc743 kconfig: Make expr_copy() take a const argument
Fixes
scripts/kconfig/expr.c: In function ‘expr_get_leftmost_symbol’:
scripts/kconfig/expr.c:1026:2: warning: passing argument 1 of ‘expr_copy’ discards qualifiers from pointer target type
scripts/kconfig/expr.c:67:14: note: expected ‘struct expr *’ but argument is of type ‘const struct expr *’

Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-21 17:59:16 +01:00