Skip to content

Commit

Permalink
kconfig: do not hardcode ".config" filename
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
marcows authored and sravnborg committed Jun 9, 2009
1 parent 8d90c97 commit 284026c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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)))
Expand Down

0 comments on commit 284026c

Please sign in to comment.