aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2006-07-13 14:54:07 -0400
committerSam Ravnborg <sam@neptun.ravnborg.org>2006-09-25 03:00:00 -0400
commitd3660a8cbdfad620af88b85b7bbfff29160f14c2 (patch)
treec79e6a3362e0e0831cf3a9b0b8bd9a3b7a7e79f1 /scripts
parent4f5537de7c1531398e84e18a24f667e49cc94208 (diff)
kconfig: support DOS line endings
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index a69d8acbf274..69f96b398c22 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -193,8 +193,11 @@ load:
193 continue; 193 continue;
194 *p++ = 0; 194 *p++ = 0;
195 p2 = strchr(p, '\n'); 195 p2 = strchr(p, '\n');
196 if (p2) 196 if (p2) {
197 *p2 = 0; 197 *p2-- = 0;
198 if (*p2 == '\r')
199 *p2 = 0;
200 }
198 if (def == S_DEF_USER) { 201 if (def == S_DEF_USER) {
199 sym = sym_find(line + 7); 202 sym = sym_find(line + 7);
200 if (!sym) { 203 if (!sym) {
@@ -266,6 +269,7 @@ load:
266 ; 269 ;
267 } 270 }
268 break; 271 break;
272 case '\r':
269 case '\n': 273 case '\n':
270 break; 274 break;
271 default: 275 default: