diff options
author | Arnaud Lacombe <lacombar@gmail.com> | 2010-09-04 22:11:26 +0200 |
---|---|---|
committer | Arnaud Lacombe <lacombar@gmail.com> | 2010-09-20 04:54:07 +0200 |
commit | c7abe8630ae63e90c2267c2c385a682e729e08be (patch) | |
tree | 73324b002283d95bcaf7f8af53a41a5c3eb910ce /scripts/kconfig/util.c | |
parent | kconfig: use the file's name of sourced file (diff) | |
download | linux-c7abe8630ae63e90c2267c2c385a682e729e08be.tar.xz linux-c7abe8630ae63e90c2267c2c385a682e729e08be.zip |
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>
Diffstat (limited to 'scripts/kconfig/util.c')
-rw-r--r-- | scripts/kconfig/util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 78b5c04e736b..6330cc871a47 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -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; |