Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44441
b: refs/heads/master
c: bfc1000
h: refs/heads/master
i:
  44439: c98e0fb
v: v3
  • Loading branch information
Karsten Wiese authored and Linus Torvalds committed Dec 13, 2006
1 parent bc9d81a commit 3452768
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 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: b321429325e4c911c379a5bf4156c9fc9713e425
refs/heads/master: bfc10001b11e51b59ac901d17c5f05361bd2351d
20 changes: 16 additions & 4 deletions trunk/scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int conf_read_simple(const char *name, int def)
in = zconf_fopen(name);
if (in)
goto load;
sym_change_count++;
sym_add_change_count(1);
if (!sym_defconfig_list)
return 1;

Expand Down Expand Up @@ -312,7 +312,7 @@ int conf_read(const char *name)
struct expr *e;
int i, flags;

sym_change_count = 0;
sym_set_change_count(0);

if (conf_read_simple(name, S_DEF_USER))
return 1;
Expand Down Expand Up @@ -364,7 +364,7 @@ int conf_read(const char *name)
sym->flags &= flags | ~SYMBOL_DEF_USER;
}

sym_change_count += conf_warnings || conf_unsaved;
sym_add_change_count(conf_warnings || conf_unsaved);

return 0;
}
Expand Down Expand Up @@ -528,7 +528,7 @@ int conf_write(const char *name)
"# configuration written to %s\n"
"#\n"), newname);

sym_change_count = 0;
sym_set_change_count(0);

return 0;
}
Expand Down Expand Up @@ -766,6 +766,18 @@ int conf_write_autoconf(void)
return 0;
}

static int sym_change_count;

void sym_set_change_count(int count)
{
sym_change_count = count;
}

void sym_add_change_count(int count)
{
sym_change_count += count;
}

bool conf_get_changed(void)
{
return sym_change_count;
Expand Down
2 changes: 2 additions & 0 deletions trunk/scripts/kconfig/lkc.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ char *zconf_curname(void);

/* confdata.c */
char *conf_get_default_confname(void);
void sym_set_change_count(int count);
void sym_add_change_count(int count);

/* kconfig_load.c */
void kconfig_load(void);
Expand Down
1 change: 0 additions & 1 deletion trunk/scripts/kconfig/lkc_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ P(menu_get_parent_menu,struct menu *,(struct menu *menu));

/* symbol.c */
P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
P(sym_change_count,int,);

P(sym_lookup,struct symbol *,(const char *name, int isconst));
P(sym_find,struct symbol *,(const char *name));
Expand Down
3 changes: 1 addition & 2 deletions trunk/scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ struct symbol symbol_yes = {
.flags = SYMBOL_VALID,
};

int sym_change_count;
struct symbol *sym_defconfig_list;
struct symbol *modules_sym;
tristate modules_val;
Expand Down Expand Up @@ -379,7 +378,7 @@ void sym_clear_all_valid(void)

for_all_symbols(i, sym)
sym->flags &= ~SYMBOL_VALID;
sym_change_count++;
sym_add_change_count(1);
if (modules_sym)
sym_calc_value(modules_sym);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/zconf.tab.c_shipped
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ void conf_parse(const char *name)
sym_check_deps(sym);
}

sym_change_count = 1;
sym_set_change_count(1);
}

const char *zconf_tokenname(int token)
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/zconf.y
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ void conf_parse(const char *name)
sym_check_deps(sym);
}

sym_change_count = 1;
sym_set_change_count(1);
}

const char *zconf_tokenname(int token)
Expand Down

0 comments on commit 3452768

Please sign in to comment.