summaryrefslogtreecommitdiffstats
path: root/package/config/patches/09-implement-kconfig-probability.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-08-31 23:35:05 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-09-17 08:17:06 +0200
commit56da3859c770b83631ebae810dfb3024c1a9cbd2 (patch)
tree0f253485b64572a2ec87b6d91cd07f09d2fab652 /package/config/patches/09-implement-kconfig-probability.patch
parent59a326b934737483531c49c99acda7874c72e335 (diff)
downloadbuildroot-novena-56da3859c770b83631ebae810dfb3024c1a9cbd2.tar.gz
buildroot-novena-56da3859c770b83631ebae810dfb3024c1a9cbd2.zip
support: move kconfig stuff from package/config to support/kconfig
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/config/patches/09-implement-kconfig-probability.patch')
-rw-r--r--package/config/patches/09-implement-kconfig-probability.patch44
1 files changed, 0 insertions, 44 deletions
diff --git a/package/config/patches/09-implement-kconfig-probability.patch b/package/config/patches/09-implement-kconfig-probability.patch
deleted file mode 100644
index 3f09673b8..000000000
--- a/package/config/patches/09-implement-kconfig-probability.patch
+++ /dev/null
@@ -1,44 +0,0 @@
----
- confdata.c | 22 +++++++++++++++++++---
- 1 file changed, 19 insertions(+), 3 deletions(-)
-
-Index: config/confdata.c
-===================================================================
---- config.orig/confdata.c
-+++ config/confdata.c
-@@ -996,7 +996,16 @@
- void conf_set_all_new_symbols(enum conf_def_mode mode)
- {
- struct symbol *sym, *csym;
-- int i, cnt;
-+ int i, cnt, prob = 50;
-+
-+ if (mode == def_random) {
-+ char *endp, *env = getenv("KCONFIG_PROBABILITY");
-+ if (env && *env) {
-+ int tmp = (int)strtol(env, &endp, 10);
-+ if (*endp == '\0' && tmp >= 0 && tmp <= 100)
-+ prob = tmp;
-+ }
-+ }
-
- for_all_symbols(i, sym) {
- if (sym_has_value(sym))
-@@ -1015,8 +1024,15 @@
- sym->def[S_DEF_USER].tri = no;
- break;
- case def_random:
-- cnt = sym_get_type(sym) == S_TRISTATE ? 3 : 2;
-- sym->def[S_DEF_USER].tri = (tristate)(rand() % cnt);
-+ cnt = (rand() % 100) - (100 - prob);
-+ if (cnt < 0)
-+ sym->def[S_DEF_USER].tri = no;
-+ else
-+ if ((sym_get_type(sym) == S_TRISTATE)
-+ && (cnt > prob/2))
-+ sym->def[S_DEF_USER].tri = mod;
-+ else
-+ sym->def[S_DEF_USER].tri = yes;
- break;
- default:
- continue;