public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/28] kconfig: support DOS line endings
@ 2006-09-24 21:17 sam
  2006-09-24 21:17 ` [PATCH 2/28] kbuild: consistently decide when to rebuild a target sam
  0 siblings, 1 reply; 35+ messages in thread
From: sam @ 2006-09-24 21:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matthew Wilcox, Sam Ravnborg

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


^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2006-09-25 17:57 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-24 21:17 [PATCH 1/28] kconfig: support DOS line endings sam
2006-09-24 21:17 ` [PATCH 2/28] kbuild: consistently decide when to rebuild a target sam
2006-09-24 21:17   ` [PATCH 3/28] kbuild: add unifdef sam
2006-09-24 21:18     ` [PATCH 4/28] kbuild: replace use of strlcpy with a dedicated implmentation in unifdef sam
2006-09-24 21:18       ` [PATCH 5/28] kbuild: use in-kernel unifdef sam
2006-09-24 21:18         ` [PATCH 6/28] remove RPM_BUILD_ROOT from asm-offsets.h sam
2006-09-24 21:18           ` [PATCH 7/28] kconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txt sam
2006-09-24 21:18             ` [PATCH 8/28] kbuild: linguistic fixes for Documentation/kbuild/modules.txt sam
2006-09-24 21:18               ` [PATCH 9/28] kbuild: linguistic fixes for Documentation/kbuild/makefiles.txt sam
2006-09-24 21:18                 ` [PATCH 10/28] kbuild: ignore references from ".pci_fixup" to ".init.text" sam
2006-09-24 21:18                   ` [PATCH 11/28] kbuild: modpost on vmlinux regardless of CONFIG_MODULES sam
2006-09-24 21:18                     ` [PATCH 12/28] kbuild: make V=2 tell why a target is rebuild sam
2006-09-24 21:18                       ` [PATCH 13/28] kbuild: make -rR is now default sam
2006-09-24 21:18                         ` [PATCH 14/28] kbuild: preperly align SYSMAP output sam
2006-09-24 21:18                           ` [PATCH 15/28] kbuild: add missing return statement in modpost.c:secref_whitelist() sam
2006-09-24 21:18                             ` [PATCH 16/28] kbuild: create output directory for hostprogs with O=.. build sam
2006-09-24 21:18                               ` [PATCH 17/28] kbuild: remove debug left-over from Makefile.host sam
2006-09-24 21:18                                 ` [PATCH 18/28] kbuild: fail kernel compilation in case of unresolved module symbols sam
2006-09-24 21:18                                   ` [PATCH 19/28] kbuild: update help in top level Makefile sam
2006-09-24 21:18                                     ` [PATCH 20/28] Documentaion: update Documentation/Changes with minimum versions sam
2006-09-24 21:18                                       ` [PATCH 21/28] kbuild: clarify "make C=" build option sam
2006-09-24 21:18                                         ` [PATCH 22/28] kbuild: fix for some typos in Documentation/makefiles.txt sam
2006-09-24 21:18                                           ` [PATCH 23/28] kbuild: Extend kbuild/defconfig tags support to exuberant ctags sam
2006-09-24 21:18                                             ` [PATCH 24/28] kbuild: fixup Documentation/kbuild/modules.txt sam
2006-09-24 21:18                                               ` [PATCH 25/28] kbuild: correct and clarify versioning info in Makefile sam
2006-09-24 21:18                                                 ` [PATCH 26/28] kbuild: fix "mkdir -p" usage in scripts/package/mkspec sam
2006-09-24 21:18                                                   ` [PATCH 27/28] dontdiff: add utsrelease.h sam
2006-09-24 21:18                                                     ` [PATCH 28/28] kbuild: add distclean info to 'make help' and more details for 'clean' sam
2006-09-24 22:20                                   ` [PATCH 18/28] kbuild: fail kernel compilation in case of unresolved module symbols Al Viro
2006-09-24 22:35                                     ` Sam Ravnborg
2006-09-24 22:36                                       ` Al Viro
2006-09-24 22:47                                         ` Sam Ravnborg
2006-09-24 22:48                                           ` Al Viro
2006-09-25  6:24                         ` [PATCH 13/28] kbuild: make -rR is now default Jan Engelhardt
2006-09-25 18:02                           ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox