projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kconfig: send error messages to stderr
[carl9170fw.git]
/
config
/
confdata.c
diff --git
a/config/confdata.c
b/config/confdata.c
index 8028a9d3fdaf3a1136265f026682f1bc0bf8d80f..2e030b4c736a2876f9a8499a5bd5f0b3939487e4 100644
(file)
--- a/
config/confdata.c
+++ b/
config/confdata.c
@@
-16,6
+16,11
@@
#include "lkc.h"
#include "lkc.h"
+struct conf_printer {
+ void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
+ void (*print_comment)(FILE *, const char *, void *);
+};
+
static void conf_warning(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
static void conf_warning(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
@@
-23,7
+28,7
@@
static void conf_message(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
static const char *conf_filename;
__attribute__ ((format (printf, 1, 2)));
static const char *conf_filename;
-static int conf_lineno, conf_warnings
, conf_unsaved
;
+static int conf_lineno, conf_warnings;
const char conf_defname[] = "include/generated/defconfig";
const char conf_defname[] = "include/generated/defconfig";
@@
-262,11
+267,8
@@
int conf_read_simple(const char *name, int def)
if (in)
goto load;
sym_add_change_count(1);
if (in)
goto load;
sym_add_change_count(1);
- if (!sym_defconfig_list) {
- if (modules_sym)
- sym_calc_value(modules_sym);
+ if (!sym_defconfig_list)
return 1;
return 1;
- }
for_all_defaults(sym_defconfig_list, prop) {
if (expr_calc_value(prop->visible.expr) == no ||
for_all_defaults(sym_defconfig_list, prop) {
if (expr_calc_value(prop->visible.expr) == no ||
@@
-288,7
+290,6
@@
load:
conf_filename = name;
conf_lineno = 0;
conf_warnings = 0;
conf_filename = name;
conf_lineno = 0;
conf_warnings = 0;
- conf_unsaved = 0;
def_flags = SYMBOL_DEF << def;
for_all_symbols(i, sym) {
def_flags = SYMBOL_DEF << def;
for_all_symbols(i, sym) {
@@
-373,7
+374,9
@@
load:
continue;
} else {
if (line[0] != '\r' && line[0] != '\n')
continue;
} else {
if (line[0] != '\r' && line[0] != '\n')
- conf_warning("unexpected data");
+ conf_warning("unexpected data: %.*s",
+ (int)strcspn(line, "\r\n"), line);
+
continue;
}
setsym:
continue;
}
setsym:
@@
-399,21
+402,23
@@
setsym:
}
free(line);
fclose(in);
}
free(line);
fclose(in);
-
- if (modules_sym)
- sym_calc_value(modules_sym);
return 0;
}
int conf_read(const char *name)
{
struct symbol *sym;
return 0;
}
int conf_read(const char *name)
{
struct symbol *sym;
+ int conf_unsaved = 0;
int i;
sym_set_change_count(0);
int i;
sym_set_change_count(0);
- if (conf_read_simple(name, S_DEF_USER))
+ if (conf_read_simple(name, S_DEF_USER)) {
+ sym_calc_value(modules_sym);
return 1;
return 1;
+ }
+
+ sym_calc_value(modules_sym);
for_all_symbols(i, sym) {
sym_calc_value(sym);
for_all_symbols(i, sym) {
sym_calc_value(sym);
@@
-890,6
+895,7
@@
static int conf_split_config(void)
name = conf_get_autoconfig_name();
conf_read_simple(name, S_DEF_AUTO);
name = conf_get_autoconfig_name();
conf_read_simple(name, S_DEF_AUTO);
+ sym_calc_value(modules_sym);
if (chdir("include/generated"))
return 1;
if (chdir("include/generated"))
return 1;
@@
-1180,7
+1186,7
@@
void set_all_choice_values(struct symbol *csym)
bool conf_set_all_new_symbols(enum conf_def_mode mode)
{
struct symbol *sym, *csym;
bool conf_set_all_new_symbols(enum conf_def_mode mode)
{
struct symbol *sym, *csym;
- int i, cnt, pby, pty, ptm; /* pby: probability of bool
ean
= y
+ int i, cnt, pby, pty, ptm; /* pby: probability of bool
= y
* pty: probability of tristate = y
* ptm: probability of tristate = m
*/
* pty: probability of tristate = y
* ptm: probability of tristate = m
*/