mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-18 15:44:02 +08:00
kconfig: expand file names
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:
parent
e82dae9083
commit
c7abe8630a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user