From patchwork Sun May 17 23:36:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Heidelberg X-Patchwork-Id: 24356 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4HNaqB4015801 for ; Sun, 17 May 2009 23:37:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755471AbZEQXg6 (ORCPT ); Sun, 17 May 2009 19:36:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755495AbZEQXg5 (ORCPT ); Sun, 17 May 2009 19:36:57 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:43809 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754920AbZEQXgt (ORCPT ); Sun, 17 May 2009 19:36:49 -0400 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id 840FE10273A47; Mon, 18 May 2009 01:36:50 +0200 (CEST) Received: from [89.59.115.214] (helo=localhost.localdomain) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #277) id 1M5puU-0006Qi-01; Mon, 18 May 2009 01:36:50 +0200 From: Markus Heidelberg To: Sam Ravnborg , Roman Zippel Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Heidelberg Subject: [PATCH resend 09/10] kconfig: do not hardcode ".config" filename Date: Mon, 18 May 2009 01:36:53 +0200 Message-Id: <1242603414-9267-10-git-send-email-markus.heidelberg@web.de> X-Mailer: git-send-email 1.6.3.1.20.ga30f In-Reply-To: <1242603414-9267-1-git-send-email-markus.heidelberg@web.de> References: <1242603414-9267-1-git-send-email-markus.heidelberg@web.de> X-Sender: markus.heidelberg@web.de X-Provags-ID: V01U2FsdGVkX1/rS2vkP6eu4aBvP69lAhP1dm74BoRscFPM7b4d 4L7lFpsYP7+RJlJjZ3AgjFdrP29H5l3j8yH9TJg80HW6NZL8ua fw4f10DYOLcfd2X3p1cQ== Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 --- 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)))