public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] metadata: Ignore system macros
@ 2021-11-05 14:04 Cyril Hrubis
  2021-11-05 14:11 ` Petr Vorel
  2021-11-05 14:24 ` Richard Palethorpe
  0 siblings, 2 replies; 4+ messages in thread
From: Cyril Hrubis @ 2021-11-05 14:04 UTC (permalink / raw)
  To: ltp

Ingore all macros that start with underscore. Unless we do that we get
several thousands of __NR_foo macros and the hash table cannot keep up.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 metadata/metaparse.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/metadata/metaparse.c b/metadata/metaparse.c
index b38550550..f71d8628d 100644
--- a/metadata/metaparse.c
+++ b/metadata/metaparse.c
@@ -624,6 +624,9 @@ static void parse_macro(FILE *f)
 
 	macro_get_val(f, val, sizeof(val));
 
+	if (name[0] == '_')
+		return;
+
 	ENTRY e = {
 		.key = strdup(name),
 		.data = strdup(val),
-- 
2.32.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2021-11-05 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-05 14:04 [LTP] [PATCH] metadata: Ignore system macros Cyril Hrubis
2021-11-05 14:11 ` Petr Vorel
2021-11-05 14:28   ` Cyril Hrubis
2021-11-05 14:24 ` Richard Palethorpe

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