This will allow to use the following construct in source files:

config FOO
    string
    default "foo"

source "$FOO/Kconfig"

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Arnaud Lacombe 2010-09-04 16:11:26 -04:00
Родитель e82dae9083
Коммит c7abe8630a
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -12,15 +12,18 @@
struct file *file_lookup(const char *name)
{
struct file *file;
const char *file_name = sym_expand_string_value(name);
for (file = file_list; file; file = file->next) {
if (!strcmp(name, file->name))
if (!strcmp(name, file->name)) {
free((void *)file_name);
return file;
}
}
file = malloc(sizeof(*file));
memset(file, 0, sizeof(*file));
file->name = strdup(name);
file->name = file_name;
file->next = file_list;
file_list = file;
return file;