Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204851
b: refs/heads/master
c: 861b4ea
h: refs/heads/master
i:
  204849: 4c2df94
  204847: 6c65089
v: v3
  • Loading branch information
Sam Ravnborg authored and Michal Marek committed Aug 3, 2010
1 parent ec1c543 commit 35aee83
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef61ca88c511154d6bead23c08f9a021cfdfeb01
refs/heads/master: 861b4ea4cc0eade661480f1ce197ae747f22a918
7 changes: 3 additions & 4 deletions trunk/scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ PHONY += allnoconfig allyesconfig allmodconfig randconfig
allnoconfig allyesconfig allmodconfig randconfig: $(obj)/conf
$< --$@ $(Kconfig)

PHONY += nonint_oldconfig oldnoconfig defconfig
PHONY += listnewconfig oldnoconfig defconfig

nonint_oldconfig oldnoconfig: $(obj)/conf
listnewconfig oldnoconfig: $(obj)/conf
$< --$@ $(Kconfig)

defconfig: $(obj)/conf
Expand Down Expand Up @@ -122,8 +122,7 @@ help:
@echo ' allmodconfig - New config selecting modules when possible'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allnoconfig - New config where all options are answered with no'
@echo ' nonint_oldconfig - Checks the current configuration and fails if an option is '
@echo ' not set'
@echo ' listnewconfig - List new options'
@echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)'

# lxdialog stuff
Expand Down
34 changes: 11 additions & 23 deletions trunk/scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
#define LKC_DIRECT_LINK
#include "lkc.h"

/* Return codes */
#define EUNSETOPT 2 /* if -B and -b are used and unset config
* options were found */

static void conf(struct menu *menu);
static void check_conf(struct menu *menu);

Expand All @@ -33,7 +29,7 @@ enum input_mode {
allmodconfig,
randconfig,
defconfig,
nonint_oldconfig,
listnewconfig,
oldnoconfig,
} input_mode = oldaskconfig;

Expand All @@ -45,7 +41,6 @@ static int sync_kconfig;
static int conf_cnt;
static char line[128];
static struct menu *rootEntry;
static int unset_variables;

static void print_help(struct menu *menu)
{
Expand Down Expand Up @@ -366,7 +361,7 @@ static void conf(struct menu *menu)
switch (prop->type) {
case P_MENU:
if ((input_mode == silentoldconfig ||
input_mode == nonint_oldconfig ||
input_mode == listnewconfig ||
input_mode == oldnoconfig) &&
rootEntry != menu) {
check_conf(menu);
Expand Down Expand Up @@ -426,16 +421,9 @@ static void check_conf(struct menu *menu)
if (sym && !sym_has_value(sym)) {
if (sym_is_changable(sym) ||
(sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
if (input_mode == nonint_oldconfig ||
input_mode == oldnoconfig) {
if (input_mode == nonint_oldconfig &&
sym->name && !sym_is_choice_value(sym)) {
if (!unset_variables)
fprintf(stderr, "The following"
" variables are not set:\n");
fprintf(stderr, "CONFIG_%s\n",
sym->name);
unset_variables++;
if (input_mode == listnewconfig) {
if (sym->name && !sym_is_choice_value(sym)) {
printf("CONFIG_%s\n", sym->name);
}
} else {
if (!conf_cnt++)
Expand All @@ -459,7 +447,7 @@ static struct option long_opts[] = {
{"allyesconfig", no_argument, NULL, allyesconfig},
{"allmodconfig", no_argument, NULL, allmodconfig},
{"randconfig", no_argument, NULL, randconfig},
{"nonint_oldconfig", no_argument, NULL, nonint_oldconfig},
{"listnewconfig", no_argument, NULL, listnewconfig},
{"oldnoconfig", no_argument, NULL, oldnoconfig},
{NULL, 0, NULL, 0}
};
Expand Down Expand Up @@ -539,7 +527,7 @@ int main(int ac, char **av)
case silentoldconfig:
case oldaskconfig:
case oldconfig:
case nonint_oldconfig:
case listnewconfig:
case oldnoconfig:
conf_read(NULL);
break;
Expand Down Expand Up @@ -602,15 +590,15 @@ int main(int ac, char **av)
conf(&rootmenu);
input_mode = silentoldconfig;
/* fall through */
case nonint_oldconfig:
case listnewconfig:
case oldnoconfig:
case silentoldconfig:
/* Update until a loop caused no more changes */
do {
conf_cnt = 0;
check_conf(&rootmenu);
} while (conf_cnt &&
(input_mode != nonint_oldconfig &&
(input_mode != listnewconfig &&
input_mode != oldnoconfig));
break;
}
Expand All @@ -627,11 +615,11 @@ int main(int ac, char **av)
fprintf(stderr, _("\n*** Error during update of the kernel configuration.\n\n"));
return 1;
}
} else if (!unset_variables || input_mode != nonint_oldconfig) {
} else if (input_mode != listnewconfig) {
if (conf_write(NULL)) {
fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
exit(1);
}
}
return unset_variables ? EUNSETOPT : 0;
return 0;
}

0 comments on commit 35aee83

Please sign in to comment.