Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287547 > unrolled thread

[PATCH] genksyms: Handle string literals with spaces in reference files

Started byMichal Marek <mmarek@suse.com>
First post2015-12-09 16:10 +0100
Last post2015-12-10 11:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] genksyms: Handle string literals with spaces in reference files Michal Marek <mmarek@suse.com> - 2015-12-09 16:10 +0100
    Re: [PATCH] genksyms: Handle string literals with spaces in reference  files Michal Marek <mmarek@suse.cz> - 2015-12-10 11:10 +0100

#1287547 — [PATCH] genksyms: Handle string literals with spaces in reference files

FromMichal Marek <mmarek@suse.com>
Date2015-12-09 16:10 +0100
Subject[PATCH] genksyms: Handle string literals with spaces in reference files
Message-ID<qDOxs-1zF-13@gated-at.bofh.it>
The reference files use spaces to separate tokens, however, we must
preserve spaces inside string literals. Currently the only case in the
tree is struct edac_raw_error_desc in <linux/edac.h>:

$ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
$ mv drivers/edac/amd64_edac.{symtypes,symref}
$ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
drivers/edac/amd64_edac.c:527: warning: amd64_get_dram_hole_info: modversion changed because of changes in struct edac_raw_error_desc

Signed-off-by: Michal Marek <mmarek@suse.com>
---
 scripts/genksyms/genksyms.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index 88632df4381b..dafaf96e0a34 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -423,13 +423,15 @@ static struct string_list *read_node(FILE *f)
 	struct string_list node = {
 		.string = buffer,
 		.tag = SYM_NORMAL };
-	int c;
+	int c, in_string = 0;
 
 	while ((c = fgetc(f)) != EOF) {
-		if (c == ' ') {
+		if (!in_string && c == ' ') {
 			if (node.string == buffer)
 				continue;
 			break;
+		} else if (c == '"') {
+			in_string = !in_string;
 		} else if (c == '\n') {
 			if (node.string == buffer)
 				return NULL;
-- 
2.1.4

--
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/

[toc] | [next] | [standalone]


#1288422 — Re: [PATCH] genksyms: Handle string literals with spaces in reference files

FromMichal Marek <mmarek@suse.cz>
Date2015-12-10 11:10 +0100
SubjectRe: [PATCH] genksyms: Handle string literals with spaces in reference files
Message-ID<qE6kG-4M5-31@gated-at.bofh.it>
In reply to#1287547
Dne 9.12.2015 v 16:06 Michal Marek napsal(a):
> The reference files use spaces to separate tokens, however, we must
> preserve spaces inside string literals. Currently the only case in the
> tree is struct edac_raw_error_desc in <linux/edac.h>:
> 
> $ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
> $ mv drivers/edac/amd64_edac.{symtypes,symref}
> $ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
> drivers/edac/amd64_edac.c:527: warning: amd64_get_dram_hole_info: modversion changed because of changes in struct edac_raw_error_desc
> 
> Signed-off-by: Michal Marek <mmarek@suse.com>

Applied to kbuild.git#kbuild.

Michal

--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web