From: Arnaud Lacombe Date: Sat, 4 Sep 2010 20:11:26 +0000 (-0400) Subject: kconfig: expand file names X-Git-Tag: upstream/snapshot3+hdmi~12104^2~22^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7abe8630ae63e90c2267c2c385a682e729e08be;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Reviewed-by: Sam Ravnborg Reviewed-by: Michal Marek --- diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 78b5c04..6330cc8 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;