From: Markus Heidelberg <markus.heidelberg@web.de>
To: Sam Ravnborg <sam@ravnborg.org>, Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Markus Heidelberg <markus.heidelberg@web.de>
Subject: [PATCH resend 09/10] kconfig: do not hardcode ".config" filename
Date: Mon, 18 May 2009 01:36:53 +0200 [thread overview]
Message-ID: <1242603414-9267-10-git-send-email-markus.heidelberg@web.de> (raw)
In-Reply-To: <1242603414-9267-1-git-send-email-markus.heidelberg@web.de>
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>
---
scripts/kconfig/conf.c | 7 ++++---
scripts/kconfig/qconf.cc | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index d190092..3baaaec 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -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);
}
}
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 19811fc..ce7d508 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -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)))
--
1.6.3.1.20.ga30f
next prev parent reply other threads:[~2009-05-17 23:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-17 23:36 [PATCH resend 00/10] kconfig: various fixes and documentation updates Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 01/10] kconfig: fix typo "mconfig" to "menuconfig" in a comment Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 02/10] kconfig: add a note about the deps to the 'silentoldconfig' help Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 03/10] kconfig: resort the documentation of the environment variables Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 04/10] gitignore: ignore Kconfig i18n files Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 05/10] kconfig qconf: fix -Wall compiler warnings Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 06/10] kconfig qconf: fix namespace for Horizontal and Vertical enum values Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 07/10] kconfig qconf: add namespace for use of Key_ " Markus Heidelberg
2009-05-17 23:36 ` [PATCH resend 08/10] kconfig qconf: fix the type of the desktop widget Markus Heidelberg
2009-05-17 23:36 ` Markus Heidelberg [this message]
2009-05-17 23:36 ` [PATCH resend 10/10] kconfig: do not hardcode "include/config/auto.conf" filename Markus Heidelberg
2009-05-28 6:43 ` [PATCH resend 00/10] kconfig: various fixes and documentation updates Andrew Morton
2009-06-05 22:03 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242603414-9267-10-git-send-email-markus.heidelberg@web.de \
--to=markus.heidelberg@web.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®