From: Mike Pagano <mpagano@gentoo.org>
To: linux-kbuild@vger.kernel.org
Subject: [PATCH] kconfig: Gracefully exit if the default config files are not present
Date: Tue, 13 Aug 2013 17:29:34 -0400 [thread overview]
Message-ID: <6523722.tcSzR9xRoc@comanche> (raw)
Gracefully exit if the default config files are not present. (.config and
.config.old)
Diffconfig is a utility script for comparing kernel configuration files.
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
---
scripts/diffconfig | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/diffconfig b/scripts/diffconfig
index b91f3e3..33c696f 100755
--- a/scripts/diffconfig
+++ b/scripts/diffconfig
@@ -94,8 +94,12 @@ def main():
configa_filename = sys.argv[1]
configb_filename = sys.argv[2]
- a = readconfig(file(configa_filename))
- b = readconfig(file(configb_filename))
+ try:
+ a = readconfig(file(configa_filename))
+ b = readconfig(file(configb_filename))
+ except IOError,(errno, strerror):
+ print "I/O error(%s: %s)\n" % (errno, strerror)
+ usage()
# print items in a but not b (accumulate, sort and print)
old = []
--
1.8.1.5
next reply other threads:[~2013-08-14 1:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 21:29 Mike Pagano [this message]
2013-08-15 15:45 ` [PATCH] kconfig: Gracefully exit if the default config files are not present Michal Marek
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=6523722.tcSzR9xRoc@comanche \
--to=mpagano@gentoo.org \
--cc=linux-kbuild@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.