kconfig: do not hardcode ".config" filename
authorMarkus Heidelberg <markus.heidelberg@web.de>
Sun, 17 May 2009 23:36:53 +0000 (01:36 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Tue, 9 Jun 2009 20:37:51 +0000 (22:37 +0200)
Rather than hardcoding ".config" use conf_get_configname(), which also
respects the environment variable KCONFIG_CONFIG.

This fixes "make silentoldconfig" when KCONFIG_CONFIG is used and also
suggests the given filename for "Load" and "Save as" in qconf.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/kconfig/conf.c
scripts/kconfig/qconf.cc

index d190092c3b6ebf00d09a68fa4e5cb606afacd364..3baaaecd6b13ef3ba684f8e5320cfef10f1f5a4e 100644 (file)
@@ -498,14 +498,15 @@ int main(int ac, char **av)
        conf_parse(name);
        //zconfdump(stdout);
        if (sync_kconfig) {
-               if (stat(".config", &tmpstat)) {
+               name = conf_get_configname();
+               if (stat(name, &tmpstat)) {
                        fprintf(stderr, _("***\n"
                                "*** You have not yet configured your kernel!\n"
-                               "*** (missing kernel .config file)\n"
+                               "*** (missing kernel config file \"%s\")\n"
                                "***\n"
                                "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
                                "*** \"make menuconfig\" or \"make xconfig\").\n"
-                               "***\n"));
+                               "***\n"), name);
                        exit(1);
                }
        }
index 19811fcca6d6b90f28ce485cd09789dda3f86143..ce7d508c75200b1072bb40c96e72701f742a6ddc 100644 (file)
@@ -1448,7 +1448,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 
 void ConfigMainWindow::loadConfig(void)
 {
-       QString s = QFileDialog::getOpenFileName(".config", NULL, this);
+       QString s = QFileDialog::getOpenFileName(conf_get_configname(), NULL, this);
        if (s.isNull())
                return;
        if (conf_read(QFile::encodeName(s)))
@@ -1464,7 +1464,7 @@ void ConfigMainWindow::saveConfig(void)
 
 void ConfigMainWindow::saveConfigAs(void)
 {
-       QString s = QFileDialog::getSaveFileName(".config", NULL, this);
+       QString s = QFileDialog::getSaveFileName(conf_get_configname(), NULL, this);
        if (s.isNull())
                return;
        if (conf_write(QFile::encodeName(s)))