History log of /scripts/kconfig/lkc.h
Revision Date Author Comments
37ae2d5998aa29d8bf52f124199a21341bc6d18d 23-Nov-2011 Arnaud Lacombe <lacombar@gmail.com> 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>
ab63f58f253c3eca620347f5180ca3d6a1b6aa38 02-Jul-2011 Arnaud Lacombe <lacombar@gmail.com> 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>
131c60a95e15e7d32b6f10881368e1ffe7296695 02-Jul-2011 Arnaud Lacombe <lacombar@gmail.com> kconfig: remove pending prototypes for kconfig_load()

Commit 5a6f8d2bd9e3392569ed6f29ea4d7210652f929b removed `kconfig_load()',
however, it missed an hidden prototypes in `lkc.h'. Fix this.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
e54e692ba613c2170c66ce36a3791c009680af08 16-May-2011 Arnaud Lacombe <lacombar@gmail.com> 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>
b96a0d0c78c878db6e6b5c02587ba69973e22d41 23-May-2011 Arnaud Lacombe <lacombar@gmail.com> kconfig: kill no longer needed reference to YYDEBUG

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
5a6f8d2bd9e3392569ed6f29ea4d7210652f929b 01-Jun-2011 Arnaud Lacombe <lacombar@gmail.com> 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>
4ce2c1e8e899831dd152bd0d534a60da6fb1582a 05-Dec-2010 Arnaud Lacombe <lacombar@gmail.com> kconfig: fix `zconfdebug' extern declaration

This symbol is only exist if YYDEBUG is defined.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
1ebfa5198ee96f34f2ee4ae95c92318f07341fbd 05-Dec-2010 Arnaud Lacombe <lacombar@gmail.com> kbuild/gconf: add dummy inline for bind_textdomain_codeset()

This symbols is used by gconf.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
86e187ff9bce9fbed7bfed92ae34f491cf1af50f 06-Nov-2010 Arnaud Lacombe <lacombar@gmail.com> kconfig: add an option to determine a menu's visibility

This option is aimed to add the possibility to control a menu's visibility
without adding dependency to the expression to all the submenu.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2e7a091833f014cac8a6b92573ca6cd2edd2753c 04-Sep-2010 Arnaud Lacombe <lacombar@gmail.com> kconfig: constify file name

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
ef211607ed49c475735898514c60a9797208b699 21-Aug-2010 Arnaud Lacombe <lacombar@gmail.com> kconfig: allow PACKAGE to be defined on the compiler's command-line

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
ffb5957bc48f64f0773fd3fbc43cb9bb9b38e270 15-Aug-2010 Arnaud Lacombe <lacombar@gmail.com> kconfig: allow build-time definition of the internal config prefix

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
4418a2b904805814bbd14b555d6add6a175f49f3 05-Aug-2010 Jean Sacren <sakiwit@gmail.com> kconfig: Fix warning: ignoring return value of 'fgets'

This fix facilitates fgets() either it returns on success or on error or
when end of file occurs.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
bf5e327a300a9ac959a89440e7c67dc89f3bd804 05-Aug-2010 Jean Sacren <sakiwit@gmail.com> kconfig: Fix warning: ignoring return value of 'fwrite'

This fix facilitates fwrite() in both confdata.c and expr.c, either it
succeeds in writing, or an error occurs, or the end of file is reached.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
7cf3d73b4360e91b14326632ab1aeda4cb26308d 31-Jul-2010 Sam Ravnborg <sam@ravnborg.org> kconfig: add savedefconfig

savedefconfig will save a minimal config to a file
named "defconfig".

The config symbols are saved in the same order as
they appear in the menu structure so it should
be possible to map them to the relevant menus
if desired.

The implementation was tested against several minimal
configs for arm which was created using brute-force.

There was one regression related to default numbers
which had their valid range further limited by another symbol.

Sample:

config FOO
int "foo"
default 4

config BAR
int "bar"
range 0 FOO

If FOO is set to 3 then BAR cannot take a value higher than 3.
But the current implementation will set BAR equal to 4.

This is seldomly used and the final configuration is OK,
and the fix was non-trivial.
So it was documented in the code and left as is.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
c252147de68cf58ba601278481e473dab432cee4 31-Jul-2010 Sam Ravnborg <sam@ravnborg.org> kconfig: refactor code in symbol.c

Move logic to determine default for a choice to
a separate function.
No functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
692d97c380c6dce2c35a04c5dcbce4e831a42fa0 24-Nov-2009 nir.tzachar@gmail.com <nir.tzachar@gmail.com> kconfig: new configuration interface (nconfig)

This patch was inspired by the kernel projects page, where an ncurses
replacement for menuconfig was mentioned (by Sam Ravnborg).

Building on menuconfig, this patch implements a more modern look
interface using ncurses and ncurses' satellite libraries (menu, panel,
form). The implementation does not depend on lxdialog, which is
currently distributed with the kernel.

Signed-off-by: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
da60fbbcb637b37b1d77a41886ae4e275422ca96 20-Dec-2009 Vadim Bendebury (вб) <vbendeb@google.com> menuconfig: wrap long help lines

Help text for certain config options is very extensive (the text
includes the names of all other options the option in question depends
on). Long lines are not wrapped, making it impossible to see the list
without scrolling horizontally.

This patch adds some logic which wraps help screen lines at word
boundaries to prevent truncating.

Tested by running

ARCH=powerpc make menuconfig O=/tmp/build

which shows that the long lines are now wrapped, and

ARCH=powerpc make xconfig O=/tmp/build

to demonstrate that it still compiles and operates as expected.

Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
12122f62324e7c6837ee8b0fa8d257ce7ebcfc6f 18-May-2009 Markus Heidelberg <markus.heidelberg@web.de> kconfig: do not hardcode "include/config/auto.conf" filename

Regardless of KCONFIG_AUTOCONFIG, the filename written as a Make target
into "include/config/auto.conf.cmd" was always the default one.

Of course this doesn't make it work for the Kernel kbuild system, since
there the filename is hardcoded at several places in the Makefiles.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
dc7862e5a65b9b9e0aad448398b4f652c49c9350 06-May-2008 Roman Zippel <zippel@linux-m68k.org> 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>
c4143a83031aef7ba87a62cf654d6d8fb4d8e76e 04-May-2008 Sam Ravnborg <sam@ravnborg.org> kconfig: fix MAC OS X warnings in menuconfig

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Timur Tabi <timur@freescale.com>
93449082e905ce73d0346d617dd67c4b668b58af 14-Jan-2008 Roman Zippel <zippel@linux-m68k.org> 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>
d802b50f0d63d2d18d8dae15d7e3285e99e7e7b6 01-Apr-2007 Sam Ravnborg <sam@neptun.ravnborg.org> 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>
bfc10001b11e51b59ac901d17c5f05361bd2351d 13-Dec-2006 Karsten Wiese <annabellesgarden@yahoo.de> [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>
14cdd3c402bf7c66f0bcd76e290f0770a54a4b21 09-Jun-2006 Roman Zippel <zippel@linux-m68k.org> kconfig: KCONFIG_OVERWRITECONFIG

If you set KCONFIG_OVERWRITECONFIG in environment, Kconfig will not break
symlinks when .config is a symlink to somewhere else.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
face4374e288372fba67c865eb0c92337f50d5a4 09-Jun-2006 Roman Zippel <zippel@linux-m68k.org> kconfig: add defconfig_list/module option

This makes it possible to change two options which were hardcoded sofar.
1. Any symbol can now take the role of CONFIG_MODULES
2. The more useful option is to change the list of default file names,
which kconfig uses to load the base configuration if .config isn't
available.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
f6a88aa86027bdecfc74ef7c6bf6c68233e86bb3 09-Jun-2006 Roman Zippel <zippel@linux-m68k.org> kconfig: add symbol option config syntax

This adds the general framework to the parser to define options for config
symbols with a syntax like:

config FOO
option bar[="arg"]

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
669bfad906522e74ee8d962801552a8c224c0d63 09-Jun-2006 Roman Zippel <zippel@linux-m68k.org> kconfig: allow loading multiple configurations

Extend conf_read_simple() so it can load multiple configurations.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
c1a0f5e3c01d28b6782457bee5ae5ace3a9958ec 09-Nov-2005 Roman Zippel <zippel@linux-m68k.org> [PATCH] kconfig: stricter error checking for .config

Add some more checks during the parsing of .config, so that after parsing
sym_change_count reflects the correct state whether the .config is correct and
in sync with the Kconfig or if it needs saving.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
a02f0570ae201c495ee991b959bb974af18f35cc 09-Nov-2005 Roman Zippel <zippel@linux-m68k.org> [PATCH] kconfig: improve error handling in the parser

Add a few error tokens to the parser to catch common errors and print more
descriptive error messages.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
3370f9f0d9c7d14bf71aab27fa45c0537f130614 09-Nov-2005 Roman Zippel <zippel@linux-m68k.org> [PATCH] kconfig: simplify symbol type parsing

This simplifies the parser a bit by merging the various symbol types into a
single token and adds the type to the keyword hash.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
7a88488bbc231e48a4a88ee2569bc0cc5d706f0a 09-Nov-2005 Roman Zippel <zippel@linux-m68k.org> [PATCH] kconfig: use gperf for kconfig keywords

Use gperf to generate a hash for the kconfig keywords. This greatly reduces
the size of the generated scanner and makes it easier to extend kconfig.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
70a6a0cb92f24fd6bbe2e75299168909f735676a 31-Oct-2005 Yuri Vasilevski <yvasilev@duke.math.cinvestav.mx> [PATCH] fix build on nls free systems

I made a patch that detects if libintl.h (needed for nls) is present on the
host system and if it's not, it nls support is disabled by providing
dummies for the used nls functions.

This way if there is nls support on the host system the *config targets
will build according to Arnaldo Carvalho de Melo's i18n modifications, else
it just uses the original English messages.

I have also made a bug report at kernel's bugzilla:
http://bugzilla.kernel.org/show_bug.cgi?id=5501
And there is a discussion about this problem in Gentoo's bugzilla:
http://bugs.gentoo.org/show_bug.cgi?id=99810

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fb7f6ff614f3ead2ca41bb4a348b9ea431d95176 28-Jul-2005 blaisorblade@yahoo.it <blaisorblade@yahoo.it> [PATCH] kconfig: trivial cleanup

Replace all menu_add_prop mimicking menu_add_prompt with the latter func. I've
had to add a return value to menu_add_prompt for one usage.

I've rebuilt scripts/kconfig/zconf.tab.c_shipped by hand to reflect changes
in the source (I've not the same Bison version so regenerating it wouldn't
have been not a good idea), and compared it with what Roman itself did some
time ago, and it's the same.

So I guess this can be finally merged.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
3b9fa0931dd86a1fe5507311ee8031650f5d0e8c 06-May-2005 Arnaldo Carvalho de Melo <acme@ghostprotocols.net> [PATCH] Kconfig i18n support

This patch adds i18n support for make *config, allowing users to have the
config process in their own language.

No printk was harmed in the process, don't worry, so all the bug reports,
kernel messages, etc, remain in english, just the user tools to configure
the kernel are internationalized.

Users not interested in translations can just unset the related LANG,
LC_ALL, etc env variables and have the config process in plain english,
something like:

LANG= make menuconfig

is enough for having the whole config process in english. Or just don't
install any translation file.

Translations for brazilian portuguese are being done by a team of
volunteers at:

http://www.visionflex.inf.br/kernel_ptbr/pmwiki.php/Principal/Traducoes

To start the translation process:

make update-po-config

This will generate the pot template named scripts/kconfig/linux.pot,
copy it to, say, ~/es.po, to start the translation for spanish.

To test your translation, as root issue this command:

msgfmt -o /usr/share/locale/es/LC_MESSAGES/linux.mo ~/es.po

Replace "es" with your language code.

Then execute, for instance:

make menuconfig

The current patch doesn't use any optimization to reduce the size of the
generated .mo file, it is possible to use the config option as a key, but
this doesn't prevent the current patch from being used or the translations
done under the current scheme to be in any way lost if we chose to do any
kind of keying.

Thanks to Fabricio Vaccari for starting the pt_BR (brazilian portuguese)
translation effort, Thiago Maciera for helping me with the gconf.cc (QT
frontent) i18n coding and to all the volunteers that are already working on
the first translation, to pt_BR.

I left the question on whether to ship the translations with the stock kernel
sources to be discussed here, please share your suggestions.

Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org
Signed-off-by: Andrew Morton <akpm@osdl.org>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!