[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1159132704708-git-send-email-sam@ravnborg.org>
Date: Sun, 24 Sep 2006 23:17:57 +0200
From: sam@...nborg.org
To: linux-kernel@...r.kernel.org
Cc: Matthew Wilcox <matthew@....cx>, Sam Ravnborg <sam@...nborg.org>
Subject: [PATCH 1/28] kconfig: support DOS line endings
From: Matthew Wilcox <matthew@....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@....cx>
Signed-off-by: Sam Ravnborg <sam@...nborg.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists