diff options
Diffstat (limited to 'scripts/kconfig/zconf.l')
-rw-r--r-- | scripts/kconfig/zconf.l | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index d8f7236cb0a3..3dbaec185cc4 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -304,9 +304,10 @@ void zconf_nextfile(const char *name) | |||
304 | memset(buf, 0, sizeof(*buf)); | 304 | memset(buf, 0, sizeof(*buf)); |
305 | 305 | ||
306 | current_buf->state = YY_CURRENT_BUFFER; | 306 | current_buf->state = YY_CURRENT_BUFFER; |
307 | yyin = zconf_fopen(name); | 307 | yyin = zconf_fopen(file->name); |
308 | if (!yyin) { | 308 | if (!yyin) { |
309 | printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); | 309 | printf("%s:%d: can't open file \"%s\"\n", |
310 | zconf_curname(), zconf_lineno(), file->name); | ||
310 | exit(1); | 311 | exit(1); |
311 | } | 312 | } |
312 | yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); | 313 | yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); |
@@ -353,7 +354,7 @@ int zconf_lineno(void) | |||
353 | return current_pos.lineno; | 354 | return current_pos.lineno; |
354 | } | 355 | } |
355 | 356 | ||
356 | char *zconf_curname(void) | 357 | const char *zconf_curname(void) |
357 | { | 358 | { |
358 | return current_pos.file ? current_pos.file->name : "<none>"; | 359 | return current_pos.file ? current_pos.file->name : "<none>"; |
359 | } | 360 | } |