summaryrefslogtreecommitdiffstats
path: root/support/kconfig/conf.c
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-11-14 00:53:35 +0100
committerPeter Korsgaard <peter@korsgaard.com>2013-11-14 12:34:49 +0100
commitb48e35a28a6391ec16f09df66ad5b1065330f265 (patch)
tree83e955dab61ba5cca95707c2b7920e74ec99e2d0 /support/kconfig/conf.c
parent147be50283c49ed15a6b56aaa5d455eec92c9615 (diff)
downloadbuildroot-b48e35a28a6391ec16f09df66ad5b1065330f265.tar.gz
buildroot-b48e35a28a6391ec16f09df66ad5b1065330f265.zip
support/kconfig: bump to kconfig from linux-3.12
With this, we can trash our probability patch, it's now upstream. Refresh a few other patches. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/kconfig/conf.c')
-rw-r--r--support/kconfig/conf.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/support/kconfig/conf.c b/support/kconfig/conf.c
index c104941cb2..553fc76d90 100644
--- a/support/kconfig/conf.c
+++ b/support/kconfig/conf.c
@@ -13,6 +13,7 @@
#include <getopt.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <errno.h>
#include "lkc.h"
@@ -514,14 +515,24 @@ int main(int ac, char **av)
{
struct timeval now;
unsigned int seed;
+ char *seed_env;
/*
* Use microseconds derived seed,
* compensate for systems where it may be zero
*/
gettimeofday(&now, NULL);
-
seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1));
+
+ seed_env = getenv("KCONFIG_SEED");
+ if( seed_env && *seed_env ) {
+ char *endp;
+ int tmp = (int)strtol(seed_env, &endp, 0);
+ if (*endp == '\0') {
+ seed = tmp;
+ }
+ }
+ fprintf( stderr, "KCONFIG_SEED=0x%X\n", seed );
srand(seed);
break;
}
@@ -642,7 +653,8 @@ int main(int ac, char **av)
conf_set_all_new_symbols(def_default);
break;
case randconfig:
- conf_set_all_new_symbols(def_random);
+ /* Really nothing to do in this loop */
+ while (conf_set_all_new_symbols(def_random)) ;
break;
case defconfig:
conf_set_all_new_symbols(def_default);
OpenPOWER on IntegriCloud