From: sam@ravnborg.org
To: linux-kernel@vger.kernel.org
Cc: Matthew Wilcox <matthew@wil.cx>, Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH] kconfig: support DOS line endings
Date: Sat, 29 Jul 2006 09:19:40 +0200 [thread overview]
Message-ID: <11541575811222-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <11541575811046-git-send-email-sam@ravnborg.org>
From: Matthew Wilcox <matthew@wil.cx>
Kconfig doesn't currently handle config files with DOS line endings.
While these are, of course, an abomination, etc, etc, it can be handy
to not have to convert them first. It's also a tiny patch and even adds
support for lines ending in just \r or even \n\r.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
scripts/kconfig/confdata.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index a69d8ac..69f96b3 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -193,8 +193,11 @@ load:
continue;
*p++ = 0;
p2 = strchr(p, '\n');
- if (p2)
- *p2 = 0;
+ if (p2) {
+ *p2-- = 0;
+ if (*p2 == '\r')
+ *p2 = 0;
+ }
if (def == S_DEF_USER) {
sym = sym_find(line + 7);
if (!sym) {
@@ -266,6 +269,7 @@ load:
;
}
break;
+ case '\r':
case '\n':
break;
default:
--
1.4.1.rc2.gfc04
next prev parent reply other threads:[~2006-07-29 7:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-29 7:15 [PATCH 0/18] kbuild fixes Sam Ravnborg
2006-07-29 7:19 ` [PATCH] kbuild: hardcode value of YACC&LEX for aic7-triple-x sam
2006-07-29 7:19 ` [PATCH] kbuild: version.h and new headers_* targets does not require a kernel config sam
2006-07-29 7:19 ` [PATCH] kbuild: .gitignore utsrelease.h sam
2006-07-29 7:19 ` [PATCH] kbuild: improve error from file2alias sam
2006-07-29 7:19 ` [PATCH] kbuild: fix typo in modpost sam
2006-07-29 7:19 ` [PATCH] kbuild: -fno-stack-protector is not good sam
2006-07-29 7:19 ` [PATCH] kconfig: correct oldconfig for unset choice options sam
2006-07-29 7:19 ` sam [this message]
2006-07-29 7:19 ` [PATCH] kbuild: consistently decide when to rebuild a target sam
2006-07-29 9:07 ` [PATCH] kbuild: hardcode value of YACC&LEX for aic7-triple-x Alexey Dobriyan
2006-07-30 19:31 ` Sam Ravnborg
2006-08-01 22:00 ` H. Peter Anvin
2006-08-01 22:00 ` H. Peter Anvin
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=11541575811222-git-send-email-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/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