diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 3f9a132..cde6792 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -602,6 +602,12 @@ static void conf(struct menu *menu) item_set_tag('L'); item_make(_(" Save an Alternate Configuration File")); item_set_tag('S'); + item_make("--- "); + item_set_tag(':'); + item_make(_(" Current Configuration File: ")); + item_set_tag(':'); + item_add_str("%s", filename); + } dialog_clear(); res = dialog_menu(prompt ? prompt : _("Main Menu"), @@ -816,8 +822,11 @@ static void conf_load(void) case 0: if (!dialog_input_result[0]) return; - if (!conf_read(dialog_input_result)) + if (!conf_read(dialog_input_result)) { + memset(filename, 0x0, PATH_MAX+1); + strncpy(filename, dialog_input_result, PATH_MAX); return; + } show_textbox(NULL, _("File does not exist!"), 5, 38); break; case 1: @@ -840,8 +849,11 @@ static void conf_save(void) case 0: if (!dialog_input_result[0]) return; - if (!conf_write(dialog_input_result)) + if (!conf_write(dialog_input_result)) { + memset(filename, 0x0, PATH_MAX+1); + strncpy(filename, dialog_input_result, PATH_MAX); return; + } show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60); break; case 1: @@ -903,7 +915,7 @@ int main(int ac, char **av) switch (res) { case 0: - if (conf_write(NULL)) { + if (conf_write(filename)) { fprintf(stderr, _("\n\n" "Error during writing of the kernel configuration.\n" "Your kernel configuration changes were NOT saved."