lkml.org 
[lkml]   [2006]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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>

Index: ./scripts/kconfig/confdata.c
===================================================================
RCS file: /var/cvs/linux-2.6/scripts/kconfig/confdata.c,v
retrieving revision 1.11
diff -u -p -r1.11 confdata.c
--- ./scripts/kconfig/confdata.c 19 Apr 2006 04:56:29 -0000 1.11
+++ ./scripts/kconfig/confdata.c 7 Jul 2006 17:29:16 -0000
@@ -177,6 +177,9 @@ int conf_read_simple(const char *name)
p2 = strchr(p, '\n');
if (p2)
*p2 = 0;
+ p2 = strchr(p, '\r');
+ if (p2)
+ *p2 = 0;
sym = sym_find(line + 7);
if (!sym) {
conf_warning("trying to assign nonexistent symbol %s", line + 7);
@@ -234,6 +237,7 @@ int conf_read_simple(const char *name)
}
break;
case '\n':
+ case '\r':
break;
default:
conf_warning("unexpected data");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-07-07 19:37    [W:0.152 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site