confdata.c (98f8475c78697f6c1155f93d3a346d9027deb5aa) | confdata.c (b75b0a819af9f78fc395b189cddd40f590194d20) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 4 */ 5 6#include <sys/mman.h> 7#include <sys/stat.h> 8#include <sys/types.h> --- 346 unchanged lines hidden (view full) --- 355 size_t line_asize = 0; 356 char *p, *p2; 357 struct symbol *sym; 358 int i, def_flags; 359 360 if (name) { 361 in = zconf_fopen(name); 362 } else { | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 4 */ 5 6#include <sys/mman.h> 7#include <sys/stat.h> 8#include <sys/types.h> --- 346 unchanged lines hidden (view full) --- 355 size_t line_asize = 0; 356 char *p, *p2; 357 struct symbol *sym; 358 int i, def_flags; 359 360 if (name) { 361 in = zconf_fopen(name); 362 } else { |
363 struct property *prop; | 363 char *env; |
364 365 name = conf_get_configname(); 366 in = zconf_fopen(name); 367 if (in) 368 goto load; 369 sym_add_change_count(1); | 364 365 name = conf_get_configname(); 366 in = zconf_fopen(name); 367 if (in) 368 goto load; 369 sym_add_change_count(1); |
370 if (!sym_defconfig_list) | 370 371 env = getenv("KCONFIG_DEFCONFIG_LIST"); 372 if (!env) |
371 return 1; 372 | 373 return 1; 374 |
373 for_all_defaults(sym_defconfig_list, prop) { 374 if (expr_calc_value(prop->visible.expr) == no || 375 prop->expr->type != E_SYMBOL) 376 continue; 377 sym_calc_value(prop->expr->left.sym); 378 name = sym_get_string_value(prop->expr->left.sym); 379 in = zconf_fopen(name); | 375 while (1) { 376 bool is_last; 377 378 while (isspace(*env)) 379 env++; 380 381 if (!*env) 382 break; 383 384 p = env; 385 while (*p && !isspace(*p)) 386 p++; 387 388 is_last = (*p == '\0'); 389 390 *p = '\0'; 391 392 in = zconf_fopen(env); |
380 if (in) { 381 conf_message("using defaults found in %s", | 393 if (in) { 394 conf_message("using defaults found in %s", |
382 name); | 395 env); |
383 goto load; 384 } | 396 goto load; 397 } |
398 399 if (is_last) 400 break; 401 402 env = p + 1; |
|
385 } 386 } 387 if (!in) 388 return 1; 389 390load: 391 conf_filename = name; 392 conf_lineno = 0; --- 756 unchanged lines hidden --- | 403 } 404 } 405 if (!in) 406 return 1; 407 408load: 409 conf_filename = name; 410 conf_lineno = 0; --- 756 unchanged lines hidden --- |